Click here to Skip to main content
14,733,075 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using two user control of asp.net in my aspx page. I have a if condition in one of my user control where i am making a decision , base of the decision i want to open a popup window. Any help will be precipitated.

How i used popup window in usercontrol?


If Not txtphyNPI.Text = lblphyNPI.Text Then
 
  MY POPUP CODE IS HERE
 
End If


I can use popup window on my aspx page, But my aspx page has a user Control and i want to use popup window in my user control. Problem is when i put code in my aspx page its work ,but i want my code in User control . when ever i put my popup window code in user control its not working.

I think its not getting references of .js files.

Thanks,

/* Added the comment to the question... */
Posted
Updated 10-Apr-12 5:25am
v2
Comments
ZurdoDev 9-Apr-12 16:54pm
   
What have you done so far and what specifically do you need help with?
   
Not really a question. What is the problem?
--SA
anjumnavid 10-Apr-12 9:37am
   
How i used popup window in usercontrol?


If Not txtphyNPI.Text = lblphyNPI.Text Then

MY POPUP CODE IS HERE

End If


I can use popup window on my aspx page, But my aspx page has a user Control and i want to use popup window in my user control. Problem is when i put code in my aspx page its work ,but i want my code in User control . when ever i put my popup window code in user control its not working.

I think its not getting references of .js files.

1 solution

hi,

Try look at RegisterStartupScript or RegisterClientScriptBlock method.

http://msdn.microsoft.com/en-us/library/z9h4dk8y.aspx[^]

http://msdn.microsoft.com/en-us/library/btf44dc9.aspx[^]
   

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