Last post Mar 19, 2010 06:47 PM by MetalAsp.Net
Sep 28, 2009 09:03 AM|tcl4p|LINK
error. The dropdownlist is a list of countries and when you select a country I use the postback to get the appropriate state values for that country loaded into the states dropdownlist. That said, since most of the users are from the US, I default those values
on the load of the page and don't need to do the postback when USA is selected. I know I can check for the US value in the postback and not reload the states dropdown, but would rather not do the postback at all if possible.
Sep 28, 2009 10:26 AM|MetalAsp.Net|LINK
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" onchange="if (stopPostback()) return false;">
return true; // stop postback
Sep 29, 2009 12:11 AM|engineerachu|LINK
<asp:DropDownList ID="ddlTest" runat='server' AutoPostBack="true" OnSelectedIndexChanged="ddlTest_SelectedIndexChange"
<asp:ListItem Text="UK" />
<asp:ListItem Text="USA" />
<asp:ListItem Text="India" />
<asp:ListItem Text="Australia" />
if(obj.options[obj.selectedIndex].text == 'USA')
Sep 29, 2009 07:23 AM|maingi4|LINK
onselectedindexchange is a server side event that is y u r getting that error since asp.net cannot find the function that u specified there in the codebehind, "Metal" is right the onchange event will work.
Sep 29, 2009 02:07 PM|tcl4p|LINK
but the postback is not cancelled. If you have any other ideas I'm all ears.
Sep 29, 2009 06:36 PM|MetalAsp.Net|LINK
Here's a wild idea. Try what I showed you. It's tested and it works.
Sep 30, 2009 12:39 AM|engineerachu|LINK
Can you post your code, please?
Sep 30, 2009 06:32 AM|tcl4p|LINK
Got it! Did it! Done!
Mar 19, 2010 06:37 PM|vladiastudillo|LINK
Hi guys, can you share how did you solve this issue?
I'm having the same problem with radiobutton's with autopostback=true, I need confirm() from user before postback, and be able to abort postback if it's cancel.
thanks a lot.
Mar 19, 2010 06:47 PM|MetalAsp.Net|LINK
vladiastudillo, you should create your own thread and ask your question. It's not proper to rehash a previously resolved and OLD thread.