Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: open new window from <asp:linkbutton >???


Message #1 by "Yu, Kevin" <kyu@N...> on Thu, 11 Oct 2001 10:34:13 -0400
hi. 

I want to redirect a page froma <asp:linkbutton commandname ="new" text

="New" runat ='server"/>



this linkbutton is under a datalist, so I got this list id and declare the

response sub as:



Sub MyDataList_ItemCommand(Sender As Object, E As DataListCommandEventArgs)

     Dim Title As String = projects.DataKeys(E.Item.ItemIndex)

     Dim Command As String = E.CommandName

     Select (Command)

        Case "new" :

            response.redirect("addprojects.aspx")

	' I want this page to be a child page from the page where the

linkbutton's in, how to do that? anyone?



        Case "Post" :

            



          Case "ViewReports" :



     End Select

End Sub



Kevin Yu

system.data.oledb

coop student

Western Research Center - Natural Resource Canada

email: kyu@n...

phone:(780) 987-8611



Message #2 by "Chris Scott" <chris@e...> on Thu, 11 Oct 2001 16:08:04 -0700
Hi,



You could call a client side function from the buttons onclick event to do

this e.g.



...onclick=OpenWindow("addprojects.aspx");...



<script language=javascript>

<!--//

function OpenWindow(psUrl)

{

window.open(psUrl);

}

//-->

</script>



HTH



Chris



----- Original Message -----

From: "Yu, Kevin" <kyu@N...>

To: "ASP+" <aspx@p...>

Sent: Thursday, October 11, 2001 7:34 AM

Subject: [aspx] open new window from <asp:linkbutton >???





> hi.

> I want to redirect a page froma <asp:linkbutton commandname ="new" text

> ="New" runat ='server"/>

>

> this linkbutton is under a datalist, so I got this list id and declare the

> response sub as:

>

> Sub MyDataList_ItemCommand(Sender As Object, E As

DataListCommandEventArgs)

>      Dim Title As String = projects.DataKeys(E.Item.ItemIndex)

>      Dim Command As String = E.CommandName

>      Select (Command)

>         Case "new" :

>             response.redirect("addprojects.aspx")

> ' I want this page to be a child page from the page where the

> linkbutton's in, how to do that? anyone?

>

>         Case "Post" :

>

>

>           Case "ViewReports" :

>

>      End Select

> End Sub

>

> Kevin Yu

> system.data.oledb
Message #3 by "Steven K. Glosny" <glosny@m...> on Mon, 15 Oct 2001 05:18:42
Why don't you change your control from a Linkbutton to a HyperLink 

button.  Then set the [NavigateUrl] and [Target] properties accordingly.



Both buttons look the same.



Steve

  Return to Index