Click here to Skip to main content
16,007,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a web-page that display Dropdownlist items of a particular table.

I add one button to add item from another page (code is as follow)


<br />
<br />
protected void Button1_Click1(object sender, EventArgs e)<br />
{<br />
        String strURL = String.Concat("wopen('", "\\city.aspx", "','mywindow',800,400);");<br />
        Page.ClientScript.RegisterStartupScript(this.GetType(), "myscript", strURL, true);<br />
<br />
Dropdownlist1.DataBind();<br />
<br />
}<br />
<br />



wopen is javascript function similar to windown.open , by clicking the above button New Form is open in another window and I am add new City

What I want to do is : Added city should be shown in my dropdownlist.



But problem is :
DropDownList refresh method is not working or it execute before window.open function. (If I add extra button with code dropdownlist1.databind() then it works)

How to solve the problem, can any one help me.


Thanks in advance.

Regards,


Hardik Shah
Posted
Updated 4-Dec-10 19:14pm
v5
Comments
Sandeep Mewara 2-Dec-10 0:37am    
not quite clear.
Sunasara Imdadhusen 2-Dec-10 0:47am    
Not clear!!
Hiren solanki 2-Dec-10 0:58am    
Added 'pre' tags for code visibility.

1 solution

Hi, All

I have Improved my question, if still it is not clear, please ask me to clearify , but help me.

Thanks,

Hardik Shah
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900