Page refresh problem.
-
hi, I am using imagebutton. On clickevent of imagebutton i am opening a popup window. but problem is that when i click imagebutton first time, then i close popup window. but after that if i refresh page that popup is again open. which i dont want. And this is happen with all of my imagebutton. can anybody help me?:confused: thanx in advance.
-
hi, I am using imagebutton. On clickevent of imagebutton i am opening a popup window. but problem is that when i click imagebutton first time, then i close popup window. but after that if i refresh page that popup is again open. which i dont want. And this is happen with all of my imagebutton. can anybody help me?:confused: thanx in advance.
Can you post the code? regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
-
hi, I am using imagebutton. On clickevent of imagebutton i am opening a popup window. but problem is that when i click imagebutton first time, then i close popup window. but after that if i refresh page that popup is again open. which i dont want. And this is happen with all of my imagebutton. can anybody help me?:confused: thanx in advance.
Are u using onclick event at client side or server side in this case? << >>
-
hi, I am using imagebutton. On clickevent of imagebutton i am opening a popup window. but problem is that when i click imagebutton first time, then i close popup window. but after that if i refresh page that popup is again open. which i dont want. And this is happen with all of my imagebutton. can anybody help me?:confused: thanx in advance.
Try this Use if(!IsPostBack) While u open window Senior Software Engineer Nothing is Impossible Even Impossible says I'M POSSIBLE
-
Can you post the code? regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
here code -------------------- Private Sub ImageButton1_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click upload_mail() End If Sub upload_mail() Dim query As String = "select client_email_id from n_client_info where id = " & Request.QueryString("clientkey_id") Dim strScript As String = "window.location =" & "'mailto:financial@ibhsolves.com'" & ";" & "</" + "script>" RegisterClientScriptBlock("anything", strScript) End Sub </x-turndown>
-
Are u using onclick event at client side or server side in this case? << >>
thanx server side onclick event
-
thanx server side onclick event
if you use asp:button, its type is submit button, that why your page get refreshed when user clicks on it. So you should inject a js code for onclick event of the button to process this event at client side e.g: button.Attributes.Add("onclick","return YourFunc();") and you just simply implement yourFunc() to open a new window and remmember add "return false;" statement to tell the client that no need to post back Hope u got the idea << >>
-
here code -------------------- Private Sub ImageButton1_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click upload_mail() End If Sub upload_mail() Dim query As String = "select client_email_id from n_client_info where id = " & Request.QueryString("clientkey_id") Dim strScript As String = "window.location =" & "'mailto:financial@ibhsolves.com'" & ";" & "</" + "script>" RegisterClientScriptBlock("anything", strScript) End Sub </x-turndown>
Please post the entire code. What you have posted doesn't make any sense. Why are you adding
" RegisterClientScriptBlock("anything", strScript)
to the client script?RegisterClientScriptBlock
is an ASP.NET (serverside) function. Not Javascript (clientside). regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are. -- modified at 13:14 Wednesday 1st March, 2006