Clicking twice

Results 1 to 2 of 2

Thread: Clicking twice

  1. #1
    Join Date
    Dec 1969

    Default Clicking twice

    I have a link button, in the event , I have this:<BR><BR> Dim script As String = String.Format _<BR> (";ViewAttachment.aspx?ID=&#03 9; + escape(document.forms[0][&#039;{0}&#039;][document.forms[0][&#039;{0}&#039;].selectedIndex].value),&#039;mywindow&#039;)", ddlAttach.UniqueID)<BR> MyLinkButton.Attributes("onclick") = script<BR><BR> If I click once, the page wont open. I have to click TWICE why??<BR><BR>Now,if I have a hyperLink, clicking ONCE works once..same code!

  2. #2
    Join Date
    Dec 1969

    Default RE: Clicking twice

    Because you&#039;re not putting the attribute in until you hit the click event. On initial load, that attribute isn&#039;t in the button. Try putting that code in the page load.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts