Administrator

Administrator

  • Admin
  • 2.2k
  • 1.4m

datalist Itemcommand event problem

Apr 15 2003 5:52 AM
Dear Friends! I have a following problem. I am using an Itemcommand event of Datalist. now in this event i have two conditions. 1)In one condition when any of the control of the data list is clicked I want to open up a pop up window. 2) In other codition I want to just redirect the user to any other page. Up tillnow there is no problem. I have implemented this. The only issue is suppose if I click on any control, and if first conditon is true then it correctly takes me to the another page. now if i click on other control and if second conditon is true then correctly opens a pop up window. Now again when a click on other control it takes me to other page and if i press back button of browser then again that pop up window opens which should not. Actually this itemcommand event event should only be fired when user clicks on any of hte control of the datalist. Why it is getting fired when I press a back button of browser? following is my conditon.(this is under Itemcommand event of datalist) If (GetTbName <> "") Then If (GetTbName = "Product") Then Response.Redirect("ProductDetails.aspx Else Response.Write("") End If end if Please help asap! Regards. Amol