473,511 Members | 15,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ridiculously Simple OnCommand Question

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

Jul 24 '06 #1
2 1183

"Roy" <ro**********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
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
Jul 24 '06 #2

"vMike" <Mi****************@noYandZ.geZwaYrrenZ.comwrote in message
news:SR*****************@bignews5.bellsouth.net...
>
"Roy" <ro**********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
>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
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.
Jul 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1206
by: Vik | last post by:
Is it possible to set OnCommand property of a button programmatically? I tried btn.Attributes.Add("OnCommand", "MySub") but this doesn't work. Thanks.
0
1118
by: Vik | last post by:
Is it possible to set OnCommand property of a button in run time? I tried MyBtn.Attributes.Add("OnCommand", "MySub") but it does not work. Thanks.
4
1480
by: ItNerd | last post by:
Someone PLEASE HELP ME!!!!! All I want to do is a simple postback and grab the value from a textbox on clicking a linkbutton like below, but the value is not writing to the screen. I am...
2
2862
by: Matthew MacDonald | last post by:
Hi all, I am adding controls to a table dynamically. I have a list that I am putting into the session to keep track of them on postback. What I need to know though, is how to add the oncommand...
1
2461
by: Sheryl Landon | last post by:
Is there a way to set the OnCommand or OnClick attributes when adding a LinkButton dynamically through code? These attributes are available when adding on design-time... Thanks, Sheryl
2
1110
by: needin4mation | last post by:
I have a single button. I want to change it's OnCommand. One moment it may be Update, the next it may be New, etc. I found btnMyButton.Command, but I cannot get it to work. The event never...
7
1063
by: byrd48 | last post by:
Hi, If I want to dynamically build an asp:table in a class file and return it to the caller as an object ie: public Table TableGenerator(){ public Table myTable = new Table(); .... .......
0
1120
by: clintonG | last post by:
A Matter of Design: OnCommand or OnClick Event Handler? Attributing a control using OnCommand supports the use of other attibutes such as CommandName and CommandArgument. AFIK OnClick does not....
0
1309
by: JSanford9482 | last post by:
Hi All, I have a Repeater that contains a LinkButton as one of the items in the ItemTemplate. I have the OnCommand (method is called "messageActions") and CommandName ("view") properties set, as...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.