|
You can not jump back. For that you will have to remove all .NET 2.0 features from current project and then ad those files in VS 2003 project. But why do you want to do that?
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
|
I have a combo box whose items are load from a List (List is not empty). I already set SelectedIndex = 0 to choose the first item in code. But at runtime, when I click the arrow, drop down list appear and I don't select any item, SelectedIndex will be set to -1. If I select an item, SelectedIndex will be other than -1.
I think SelectedIndex should be 0 even I click the arrow and don't select any item. Is there any body has same problem?
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
It's a bug.
I have a list contains several items of Tag(int id, string name). I use "id" as ValueMember and "name" as DisplayMember. If the first item has name is an empty string, the problem will appear.
When you click the arrow, seems M$ implemented to select text value to get the index. If you have an empty string, it cannot select anything and the returned index will be -1.
I'm ...
a fan of Manchester United
a fan of Ozzy Osbourne
a King of Nothing
|
|
|
|
|
Is it possible to write code to make compile-time decisions about which code to include, depending on attributes (or the presence of) generic parameters of the class?
For example:
<br />
class HashTable<TKey,optional TValue><br />
{<br />
...<br />
struct Slot {<br />
public TKey Key;<br />
#if present(TValue)<br />
public TValue Value;<br />
#endif<br />
}<br />
}<br />
When TValue is present, the hash table would behave like a normal hash table; when TValue is not present, the hash table would behave like a set. The difference between a set and a hash table is very minor and it would be error-prone and inelegant to have to duplicate the entire class to get both a set and hash table from code that, with very little modification, could support both.
Something like this might be feasible too (the semantics here with SpecialTValue are problematic; this example is just to illustrate the idea):
<br />
class HTBase<TKey,TValue><br />
{<br />
...<br />
struct Slot {<br />
public TKey Key;<br />
#if (TValue is SpecialTValue)<br />
public TValue Value;<br />
#endif<br />
}<br />
}<br />
<br />
class HashTable<TKey,TValue> : HTBase<TKey,TValue><br />
<br />
class Set<TKey> : HTBase<TKey,SpecialTValue><br />
|
|
|
|
|
Hello,
I'm hoping someone can help me figure out how to save a dataset to a text file. When the user hits the "save" button it should bring up the "save as" window.
Thanks
|
|
|
|
|
Use XmlSerializer.
using (FileStream fStream = new FileStream("test.xml", FileMode.Create))
{
XmlSerializer s = new XmlSerializer(typeof(DataSet));
s.Serialize(fStream, dataSet);
}
|
|
|
|
|
You can convert the DataSet to XML and then save the XML file to the web browser by setting Response.ContentType appropriately.
|
|
|
|
|
|
I need some help guys. Rest assured I have done some research before posting here. Thanks in advance!
I have a form where I added a datagrid control. Then I dragged a stored procedure in one of my connections to the form. This created a SqlConnection and SqlDataAdapter objects below the form. I then created a DataSet using the Generate Dataset wizard. Once the dataset is created, I associated the datasource of the datagrid control to the dataset's stored procedure. Everything seems fine as I can see the columns of the stored procedure appeared as headers in the datagrid.
Next, I initialized the stored procedures parameter by going to the SqlDataAdapter's SelectCommand property. I clicked the ellipses from Parameters and in SqlParameter Collection Editor, I went to initialize each of the parameter's value.
Finally, under the InitializeComponent() of the constructor, I put the following 2 lines to initialize the datagrid with the dataset of the stored procedure:
sqlConnection1.Open();<br />
sqlDataAdapter1.Fill(dataSet11.dbo_spMyStoredProc);
I then run my little application but then gets a runtime exception that I cannot debug due to
Registered JIT debugger is not available.
My questions are as follows:
1. Without having to debug first as there seems to be a problem with the JIT debugger, what could I have missed/done wrong that results in the runtime exception?
2. Is this the best way to running a stored procedure (with parameters) and displaying its result set in a datagrid control?
3. How do I fix the JIT debugger unavailable so I can debug my CSharp codes? It seems to be caused by corrupted VStudio so is reinstalling the only way to fix this?
Again, thank you very much. Hope to hear from you soon as my deadline is approaching.
cheers!
j11Sotware
|
|
|
|
|
oh.. My dear friend .You can search it in internet.
I think It's must exist in this site .
My MSN:hz_luyg@hotmail.com
luyuguo
|
|
|
|
|
Dear All,
I am developing web Application using asp.net and C#(VS2005).i want to know how i can fetch menu item selected(which is desinged in master.aspx) on the other C# page (welcome.aspx.cs).
regards
imran khan
|
|
|
|
|
You can manage via clientside JavaScript right?
|
|
|
|
|
hi
i have a treeview control in one form which has some nodes and i need to display them as a list in some other form's combobox control and these two forms belonging to the same project i created an instance of form1 in form2 but its not showing the controls associated with form1 with my instance object.
please suggest how to get the data of form1 into form2
thanks in advance.
|
|
|
|
|
Is it a Web Application or Windows Application?
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
Declare control on form1 as public,these will be available on another form via object of form1
Atul kumar
|
|
|
|
|
Yes, when I write my article, I will cover this approach. It's very nasty, you should never do this. At a minimum, expose properties that get ( for example ) the text of a textbox, but not the textbox itself. This isn't VB, we're supposed to know about OO.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
This is asked so often, I keep meaning to write an article on it.
kalaveer wrote: i created an instance of form1 in form2
That won't help, it's a different instance to the one that has the data you need
You can pass the right instance of form1 to form2 as a parameter, or, better yet, use delegates to pass data between forms.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
yes he is right. u would be able to access information of ur control as creating an object
would create new instance of form1 i just told that declaring a control as public would make that control accessible in another form..But to pass value u need to use delegate to communicate between them.
cheers.
|
|
|
|
|
hmm.. It's a interesting case .
hz_luyg@hotmail.com ;)
luyuguo
|
|
|
|
|
Hi,
I am developing an application of windows mobile 5.0 using visual studio 2005 C#.Net.Testing with a emulator windows mobile 5.0 pocket pc Emulator..
I have one doubt, How to identify device Manufacturer(Manufacturer of client's device) and device Model(Model of client's device)using C# code?
Appreciate if you can help..
Thanks
|
|
|
|
|
I have some link labels on a tabpage which are supposed to link to some PDF files when clicked. How do I load and open the PDF files?
Thanks!
|
|
|
|
|
Your browser should just open them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
But how do I write the code? It's a linkclicked event.
|
|
|
|
|
I was thinking of a web app. Process.Start will start the PDF viewer for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|