|
See how he goes quiet ? he'll ask this again in a few days, I am sure.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sounds like you're responding to an old question and that you're sufficiently lost that you think that the people doing your work for you, all talk to one another. Try either responding to the original answers, or reiterating the question, with what you've since tried.
I believe your core issue is that you are trying to catch events in a web form. This is not trivial, you can't just write event code because you can't hook C# to an event in a web browser.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Their design interface a Windows Form in which a dialog Combox and an object WebBrower.
You through dialog combobox on Windows Form to control the dialog box select the HTML on the WebBrowser to how?
Thank you
|
|
|
|
|
Hi,
hmm, sorry but I don't get your question... Do you want to select sth. in a combobox (URL etc.) that will change the URL of the WebBrowser?
If yes then add a SelectedIndexChanged-event to your combobox (double click in edit mode VS2008) and set the URL property of the webbroweser-control to the selected one in the generated event handler.
If this is not the solution, please rewrite your question in simple words (using e.g. numbers 1. click combox, 2. select url from combobox, 3. set url in webbrowser).
Regards
Sebastian
|
|
|
|
|
I could not understand your comments.
For example:
I designed the interface in VS.NET 2008 with C # language include:
1 WebBrowser, 1 combobox control box to select ( ... appear in the WebBrowser control when I run the program.
But I do not know what events to use the box to combobox Select the object (HTML) in WebBrowser will be under control
I used events: Onchange but not successful
|
|
|
|
|
Hi
iam trying to implement a calendar control.i want to design like this.
i have 3 drop down list(for day,month,year) at the top followed by a calendar control.
and 3 link buttons(prev,today,next) at the bottom.
if i select the particular day,month and year the calendar has to display accordingly,the same
should happen with the link buttons also.
can anyone tell me how to do this.iam not using any ajax controls.iam using
asp .net calendar control.
the code goes like this....
cal.aspx...
<table id="table1" width="100%">
<tr></tr>
<tr>
<td align="center">
<asp:DropDownList ID="cboDay" runat="server" AutoPostBack="True">
<asp:ListItem Value="1"></asp:ListItem>
<asp:ListItem Value="2"></asp:ListItem>
<asp:ListItem Value="3"></asp:ListItem>
<asp:ListItem Value="4"></asp:ListItem>
<asp:ListItem Value="5"></asp:ListItem>
<asp:ListItem Value="6"></asp:ListItem>
<asp:ListItem Value="7"></asp:ListItem>
<asp:ListItem Value="8"></asp:ListItem>
<asp:ListItem Value="9"></asp:ListItem>
<asp:ListItem Value="10"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="cboMonth" runat="server" AutoPostBack="True">
<asp:ListItem Value="January"></asp:ListItem>
<asp:ListItem Value="Febraury"></asp:ListItem>
<asp:ListItem Value="March"></asp:ListItem>
<asp:ListItem Value="April"></asp:ListItem>
<asp:ListItem Value="May"></asp:ListItem>
<asp:ListItem Value="June"></asp:ListItem>
<asp:ListItem Value="July"></asp:ListItem>
<asp:ListItem Value="August"></asp:ListItem>
<asp:ListItem Value="September"></asp:ListItem>
<asp:ListItem Value="October"></asp:ListItem>
<asp:ListItem Value="November"></asp:ListItem>
<asp:ListItem Value="December"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="cboYear" runat="server" AutoPostBack="True">
<asp:ListItem Value="2000"></asp:ListItem>
<asp:ListItem Value="2001"></asp:ListItem>
<asp:ListItem Value="2002"></asp:ListItem>
<asp:ListItem Value="2003"></asp:ListItem>
<asp:ListItem Value="2004"></asp:ListItem>
<asp:ListItem Value="2005"></asp:ListItem>
<asp:ListItem Value="2006"></asp:ListItem>
<asp:ListItem Value="2007"></asp:ListItem>
<asp:ListItem Value="2008"></asp:ListItem>
<asp:ListItem Value="2009"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<table id = "table2" width="100%">
<tr></tr>
<tr>
<td align="center">
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" Width="200px" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</td>
</tr>
</table>
<table id = "table3" width="100%">
<tr></tr>
<tr>
<td align="center">
<asp:LinkButton ID="lnkPrev" runat="server" OnClick="lnkPrev_Click">< Prev</asp:LinkButton>
<asp:LinkButton ID="lnkToday" runat="server" OnClick="lnkToday_Click">Today</asp:LinkButton>
<asp:LinkButton ID="lnkNext" runat="server" OnClick="lnkNext_Click">Next ></asp:LinkButton>
<%--<asp:Label ID="lblshow" runat="server" Text="Label"></asp:Label>--%>
</td>
</tr>
</table>
</td>
</tr>
</table>
cal.aspx.cs file...
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
cboDay.SelectedValue = Calendar1.SelectedDate.Date.ToString();
cboMonth.SelectedValue = Calendar1.SelectedDate.Month.ToString();
cboYear.SelectedValue = Calendar1.SelectedDate.Year.ToString();
}
and i want the calendar to change according to the selected date,month,year in the drop down.plz help me out...
pintoo
|
|
|
|
|
InvalidForumException has been thrown by your question. Please post it at correct forum.
|
|
|
|
|
Is there a way to populate a combobox with a Dictionary please?
|
|
|
|
|
ComboBox class has Items property which allows to add items to it. You can iterate over the items in dictionary and add them to the combobox.
|
|
|
|
|
Hi,
I haven't done this, but I would try something like myComboBox.DataSource=myDictionary.Keys;
|
|
|
|
|
Hi,
I've string which contains valid XML (not as XML file), Is there any reliable way to parse that string by using XPath class.
Thanks in advance.
|
|
|
|
|
Hi,
what about using the xmlDocument and CreateNavigator to get XPathNavigation on that string?
<br />
XmlDocument xmlDoc = new XmlDocument();<br />
xmlDoc.LoadXml(sMyXmlString);<br />
XPathNavigator myNav = xmlDoc.CreateNavigator();<br />
Does this help you?
Regards
Sebastian
|
|
|
|
|
If you're using .Net 3.5, you can using System.XML.Linq; and use the XElement object to parse it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
how can i add a .svc file to a service project with visual studio 2008 when developing a wcf application?
--- Thanks
|
|
|
|
|
Hi,
just right-click on the solution -> add new item -> select "Text File" and change the suggested name into "MyService.svc".
Regards
Sebastian
|
|
|
|
|
hi friends..
i want to retrieve the word document from sql server..
i know to store a document into sql server..
but i dont know how to retrieve the stored document..
i need coding for that in c#
its urgent..
thax
gopal
|
|
|
|
|
|
Hi..
i have successfully stored my word document in SQL server. now i need to retrieve the same document from database. and i want show the same file in my front end..
thaks in advance.....
|
|
|
|
|
That's what you said in your question. Did you have a look at the link I posted?
|
|
|
|
|
I am a novice of .net, It seems that the interface does not do anything ,could you pls tell me above it? I'll very appreciate you if you give some code for compare(one include interface,the other not using interface)
Thanks
|
|
|
|
|
Hi,
since interfaces are nothing .net-specific, you can find them in many languages C#, Java etc. An interface is a desgin pattern to be more formal about, what a class offers to the user of the class. Using interfaces is a method to achieve good system design, higher maintainability and good readibility.
You should always use interfaces if you implement interaction between losely coupled components.
I will post a link here (shame on me it's Java, but was the fastest I could get):
http://java.sun.com/docs/books/tutorial/java/concepts/interface.html[^].
If this is not sufficient, try to find sth. about object-oriented design/architecture/programming.
Does this help you?
Regards
Sebastian
|
|
|
|
|
Interfaces are very useful - even though they don't do anything themselves.
A simple example. Imagine you needed to support more than one type of database, say XML and SQLServer. Obviously, you'd have a class for both types with the necessary methods. The methods exposed by each class would be identical - the only difference would be the implementation inside the methods.
This gives you three possibilities.
1. Have both classes exposed and call the correct one
2. Have an abstract base Database class that XML and SQLServer classes derrive from
3. Create an IDatabase Interface.
1 is not very flexible and would require the calling code to be closely coupled to your DB classes. If you later needed to add Oracle as an option, all your calling code would have to be changed.
2 is kind of pointless, as the base class would never actually be used.
3 gives the perfect solution. XML : IDatabse and SQLServer : IDatabase
Now you can call the methods on an IDatabase instance, and whether XML or SQLServer are called can be decided elsewhere - the calling code will never need to be changed and can be easily extended to support others in future.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Another benefit of interfaces is that they identify/factor out common behavior among very different classes.
This lets you pass objects of two very different classes that implement interface X to the same parameter in a method that takes an interface X parameter. This lets you reuse that method's code for different classes that implement this interface.
This mechanism also helps make your code more modular. In the above example, the method doesn't know any details about the objects it receives as a parameter, except that they implement interface X. So any non-interface-X changes to the classes passed as a parameter are guaranteed to not impact the method.
|
|
|
|
|
In short an interface is a contract for an ability that you can implement in a class.
For example, a class can implement the IComparable interface, which means that you can compare one instance of the class to another. A method like List.Sort can then sort a list of instances, without the need to know anything at all about the class other than it implements the interface.
To make a method more flexible you can accept parameters of an interface type instead of a specific class. If for example your method needs to loop through some items, it can accept a parameter of the interface type IEnumerable instead of an array . Then your method can be used with any class that implements the interface, like an array , a List , a Queue , a Dictionary.KeyCollection , et.c.
You can also create interfaces to use between your own classes.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
An interface is an aspect. For example, all cars have a steering wheel (aspect of steering) but when the steering happens the implementation differs with every manufacturer or they might not, however, a user does not care what happens in the middle. The user only cares about the interface (steering) and the outcome (wheels to turn). Interfaces in programming serve the same purpose. Different classes can have their own implementation but the input and output will always be the same. Consider this:
public class Customer
{
Save()
{
ISaver saver = new DBSaver();
saver.Insert(this); // Here we are asking an implementation of Insert which inserts to the database.
}
}
internal class DBSaver : ISaver
{
public void Save(Customer c)
{
// Here the implementation is to save to DB
}
}
Now if your users decide they do not want to save to databases anymore but want to save to a flat file (not sure why they would do this but who cares), all you have to do is write another class which implements the interface, unit test it and then change only one line of code in Customer as below:
public class Customer
{
Save()
{
ISaver saver = new FlateFileSaver(); // Only this line is changed
saver.Insert(this); // Here we are asking an implementation of Insert which inserts to the flat file.
}
}
That is it and you are good to go. Your UI is still calling CustomerObject.Save() but something different is happening--polymorphism.
There are many other advantages to using Interfaces but this is the basic idea. Sometimes it also helps layout the foundation (blueprint foundation) for something. For example, I do not know how to make a good container class but if I implement the IList interface provided by .NET then I will have a good container will all the appropriate methods. Of course, you have to write good implementation because even if you write garbage inside the implementation that is what will get carried out.
|
|
|
|