Opening a web form in a different window on a button click C# Asp.net

Pergunta Opening a web form in a different window on a button click C# Asp.net

  • 2012년 6월 12일 화요일 오후 2:11
     
     

    Hi there,

    i am trying to find a way to a web form in a new window instead of over taking the current window that it is on using the button click

    thanks


    Brad Karran

모든 응답

  • 2012년 6월 12일 화요일 오후 2:34
     
      코드 있음

    In the Response you can place the url like this:

    @"window.open(""{0}"", ""{1}"");";


    Resolving n Evolving in C# (http://jeanpaulva.com)

  • 2012년 6월 12일 화요일 오후 2:35
     
      코드 있음

    Or if you need client side processing use:

    <asp:LinkButton ID="lnkLink" runat="server" Text ='<%# Bind("LINK") %>'
     OnClientClick ="window.open('file://Shared Folder/Users')">
    </asp:LinkButton>


    Resolving n Evolving in C# (http://jeanpaulva.com)

  • 2012년 6월 12일 화요일 오후 9:19
     
     
    I have got it to open a new window but it now it gives an error saying rescourse cannot be found, but  i have never moved it and it is spelled the same way

    Brad Karran

  • 2012년 6월 12일 화요일 오후 9:25
     
     
    and on top of that can i resize the window in the window.open function or is it different?

    Brad Karran

  • 2012년 6월 15일 금요일 오전 8:48
     
     

    Hi BradKarran ,

    You may have more luck getting answers in the ASP forums rather than the C# forums.

     Have a good day!


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us