Buttoncolumn in asp.net datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nmsreddi
    Contributor
    • Jul 2006
    • 366

    #1

    Buttoncolumn in asp.net datagrid

    Hello ,

    I want to generate a popup an aspx page in my applicaton ,when ever i click a linkbutton(Butt oncolumn i placed in the grid) on the datagrid.

    The logic i used in my code behind(in c#) is i am creating Attributes for that link button.

    LinkButton.Attr ibutes.Add("onc lick","window.o pen("webform2.a spx","","");")

    This works well for opening the aspx page as popup but the problem

    is ,Popup does not occurs when the button is clicked for the first time

    from second time on wards no problem it works well

    What may be the problem ,i used nothing more than adding Attributes, the line

    of code that given above

    Any one have any idea please give some suggestion about that behaviour


    Regards

    N.Msreddy
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    I would try single quotes inside where you use window.open as a first step... Try
    Code:
    LinkButton.Attributes.Add("onclick","window.open('webform2.aspx');")

    Comment

    • nmsreddi
      Contributor
      • Jul 2006
      • 366

      #3
      Hi

      thanks for reply

      I tried with singlecodes too but no use

      Please can any one with some other suggestion....

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        Please post the surrounding code to provide some more clues...

        Comment

        Working...