Ridiculously Simple OnCommand Question

R

Roy

Hey all,
This is so silly I can't believe I'm even asking, but I've never had it
come up before in my work. How do I place a string within the
parantheses in the popup_command() call below? Basically, my
popup_command function is in the vb code and accepts one parameter as a
string. No matter how I try to format the aspx syntax, I just can't get
the "string" within the parameters to work. How do I do so?


<asp:linkbutton ID="btnOPPID" runat="server"
OnCommand="popup_command()" Text="..." ></asp:linkbutton>


Protected Sub popup_command(ByVal x As String)
Response.Write(x)
End Sub


Thanks
 
V

vMike

Roy said:
Hey all,
This is so silly I can't believe I'm even asking, but I've never had it
come up before in my work. How do I place a string within the
parantheses in the popup_command() call below? Basically, my
popup_command function is in the vb code and accepts one parameter as a
string. No matter how I try to format the aspx syntax, I just can't get
the "string" within the parameters to work. How do I do so?


<asp:linkbutton ID="btnOPPID" runat="server"
OnCommand="popup_command()" Text="..." ></asp:linkbutton>


Protected Sub popup_command(ByVal x As String)
Response.Write(x)
End Sub


Thanks
Try using single quotes
 
V

vMike

vMike said:
Try using single quotes
I didn't see the sub below. I thought you were running javascript on the
page. You need to have an onCommand in asp.net form [which is Sub
LinkButton_Command(sender As Object, e As CommandEventArgs) ]
and you should also set the CommandName or CommandArgument to something and
test for that in you onCommand routine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top