I have a DropdownList I bind data to it at runtime. It alls well but when I select some value and click on a button, I need to pass the selected value to the next page in a query string but the first value reagardless of what I select is passed
DropDownList in ASP.NET has a bug. If there are 2 or more items with the same value property the SelectedIndex property is not returning the index of the focued item, as it should, but the index of the first item in the list which has got the same value property as the value of the focused one. For example if item 2 has value="a" and item 8 has got also value="a" then when you select item 8 the following code: DDL.items[DDL.SelectedItem].text is showing the text of item 2 !. Check if the same happens with the property SelectedValue.
Using the step-through I can see it going into the function but nothing happens. If I click on the button for the second time, it doesn't go intot he function at all but the row is then deleted. How can I delete this row without having to click the button 2 times? This is not really a double click thing as one click does go into the function.
In msdn as well as mcp handbook by microsoft, it is said that the datalist can be bound to anything like a dataset or dataview, but whenever I bind a control inside a template in a datalist with the dataview or dataset directly it doest repeat the values, rather just shows the first one.
Only if I bind the control added to the template to the Container, only then can I get things working right. I dont know what the container refers to in this case and how come it is different from a dataview or dataset with the same data. And why do I get the correct result only binding a control to it.
People answer questions on their own time, using their own resources and DO NOT GET PAID. This means that the level of service depends on who is reading the forum at any particular time and whether they choose to participate or not.
Chris has put a sticky note at the top of each of these forums with guidelines to help people get their questions answered better, however this is not a guarantee.
If you need an urgent question answered then you can take out a support call with Microsoft.
People answer questions on their own time, using their own resources and DO NOT GET PAID
if we consider this , in this way , the subject is very different !!
infact , if I had a sitution that I could learn ( in any way ) , certainly
i paid for every tutorial . but , do u think all people have equel sitution ? the only way for some people for learning , is "INTERNET " OR ... . Ofcourse , I'm very thanks from " CodeProject Team " .
I am using a Internet WebCam. How do i use VB.Net to view the Cam across the Net. The Internet WebCam has a IP address eg.191.xxx.xxx.xxx. how to i do it? And what is it call for me to search the web? Web Service?
I'm trying to set the Checked value in a checkbox inside a repeater control. The code I am using for this is <code> <asp:CheckBox Checked='<%# DataBinder.Eval(Container, "DataItem.Active") %>' AutoPostBack="True" Text="Active" ID="chkActive" Runat="server"></asp:CheckBox> </code> I am getting a 'Specified cast is not valid.' error when I run this. When filling the 'Active' Column in the dataset I have tried both using a string "True" and a boolean true to attempt to set the value. I get the same error both ways. Everything I can find online shows that this is the right method to do this, but I am unable to resolve this error. Any pointers on this would be very appreciated.