T
Tristan
Problem: Unable to pass an argument to a Sub Routine, Using an
<asp:button> within the templates of a DataList to execute the sub and
pass an argument to.
The datalist is filled to display a list of movies, i want the button
to submit a PK to ID a movie so that i can show the information on a
particular movie in detail.
The LinkButton code:
<asp:LinkButton id=btnShowDetails runat="server"
text='<%#Container.dataitem("Movie_Name")%>'
commandargument='<%#Container.dataitem("Movie_id")%>'
onclick='<%#LoadMovies(Container.dataitem("Movie_id"))%>' />
Public Sub LoadMovies(ByVal movRef As String, ByVal sender As
System.Object, ByVal e As System.EventArgs)
pnlMovieList.Visible = False
'using the label to test if the argument is getting through.
lblError.Text = movRef
End Sub
Any suggestions or alternatives welcome!
Regards
Tristan
<asp:button> within the templates of a DataList to execute the sub and
pass an argument to.
The datalist is filled to display a list of movies, i want the button
to submit a PK to ID a movie so that i can show the information on a
particular movie in detail.
The LinkButton code:
<asp:LinkButton id=btnShowDetails runat="server"
text='<%#Container.dataitem("Movie_Name")%>'
commandargument='<%#Container.dataitem("Movie_id")%>'
onclick='<%#LoadMovies(Container.dataitem("Movie_id"))%>' />
Public Sub LoadMovies(ByVal movRef As String, ByVal sender As
System.Object, ByVal e As System.EventArgs)
pnlMovieList.Visible = False
'using the label to test if the argument is getting through.
lblError.Text = movRef
End Sub
Any suggestions or alternatives welcome!
Regards
Tristan