0

I have a form with textbox. Besides this textbox i should have imagebutton / something which on clicking will open a popup window (lookup). This popup window will have UserId and Usernames (from db). So when the User selects one from this , the UserId should get selected in the textbox. How to do this? Please help. Can you please send me a sample of this type ..? Its very urgent.
Thanks lot..

i use the following code but its not working

to open popup

string servicename = ((Button)sender).Text.ToString();       
        string url = "Postcode.aspx?Websevice=" + servicename;
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(),"str", "<script language='javascript'>window.open('" + url + "','height=auto,width=1000,scrollbars=1,top=250,right=20');</script>", false);

this will fine open new user window

now i set selected variable of user list in parent page

string id = ViewState["Id"].ToString();
        string textid = "textbox5";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "str", "<script language='javascript'>window.opener.document.getElementById('" + textid + "').value ='" + id + "'; window.close();</script>", false);

here id is selected value and text id is parent page textbox id in which i want to pass value.

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by __avd
0

I already used it in my code see my code but i can't get value can u give me a working example. Thanks a lot for reply

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.