473,480 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

asp:imagebutton problem passing though multiple databound fields to the command argument

I need to be able to send through 2 peices of infomraiton in the
commandArgument property of a image button...

<asp:imagebutton
CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>_<%#
DataBinder.Eval(Container,"DataItem."+JR.Core.Data .JobseekerData.FLD_SEARCH_
PROFILE_ID ) %>'
CommandName='ProfileMatch'
id="match" onmouseover="this.src ='../Images/magnifyover.gif'"
onmouseout="this.src ='../Images/magnifynorm.gif'" Runat="server"
ImageUrl="../Images/editnorm.gif"
name="match">
</asp:imagebutton>

the code i am using below wont work... i get the following error message
"CS1040: Preprocessor directives must appear as the first non-whitespace
character on a line"

however when i change the line from
CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>_<%#
DataBinder.Eval(Container,"DataItem."+JR.Core.Data .JobseekerData.FLD_SEARCH_
PROFILE_ID ) %>'
TO

CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>'

and only pass thorugh one agrument it works..... how can i fix this?

regards
Darrne

Jul 21 '05 #1
1 3277
I found the problem..

instead of CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>,<%#
DataBinder.Eval(Container,"DataItem."+ JR.Core.Data.JobseekerData.FLD_ID)
%>'

change to

<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) +","+
DataBinder.Eval(Container,"DataItem."+ JR.Core.Data.JobseekerData.FLD_ID)
%>,

"Darren Clark" <dj*****@iinet.net.au> wrote in message
news:40***********************@freenews.iinet.net. au...
I need to be able to send through 2 peices of infomraiton in the
commandArgument property of a image button...

<asp:imagebutton
CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>_<%#
DataBinder.Eval(Container,"DataItem."+JR.Core.Data .JobseekerData.FLD_SEARCH_ PROFILE_ID ) %>'
CommandName='ProfileMatch'
id="match" onmouseover="this.src ='../Images/magnifyover.gif'"
onmouseout="this.src ='../Images/magnifynorm.gif'" Runat="server" ImageUrl="../Images/editnorm.gif"
name="match">
</asp:imagebutton>

the code i am using below wont work... i get the following error message
"CS1040: Preprocessor directives must appear as the first non-whitespace
character on a line"

however when i change the line from
CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>_<%#
DataBinder.Eval(Container,"DataItem."+JR.Core.Data .JobseekerData.FLD_SEARCH_ PROFILE_ID ) %>'
TO

CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+
JR.Core.Data.JobseekerData.FLD_SEARCH_ID) %>'

and only pass thorugh one agrument it works..... how can i fix this?

regards
Darrne


Jul 21 '05 #2

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

Similar topics

1
3016
by: JIM | last post by:
Hello, Does anyone knows how to set the visible property of an asp:Imagebutton to true with javascript I've the following declared : <asp:ImageButton Id="tstImage" runat="server"...
1
2336
by: Michael Evanchik | last post by:
The following tag works fine in internet explorer, but in mozilla the image is not sized and left at its actualy size. Anyone know why? I though asp.net works on any browswer. ...
3
5149
by: JIM | last post by:
Hello, I've an asp:Imagebutton on my form with the visible property set to false <asp:Imagebutton ID="tstImage" runat=Server visible=False> How can I set the visible propery to true using a...
5
1690
by: Alex D. | last post by:
Does any body knows how to link an asp:textbox to an asp:imagebutton, both inside a User Control in asp.net 2 beta 2? So when a user enter some text in the textbox and press the "Enter" key the...
13
7404
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
1
1256
by: Shapper | last post by:
Hello, I have 2 Asp:ImageButton in my .aspx file and I have the function "Run" in m .aspx.vb file. I need to run this function when one of the ImageButtons is pressed but I need to know which...
1
454
by: Darren Clark | last post by:
I need to be able to send through 2 peices of infomraiton in the commandArgument property of a image button... <asp:imagebutton CommandArgument='<%# DataBinder.Eval(Container,"DataItem."+...
5
2315
by: u0107 | last post by:
Hello all, I have an ASP generated form to maintain a back end Access Database. Some tables have Memo Type fields. On account of the limitations of the length of the URL String, I am unable...
7
2076
by: sbryguy | last post by:
Greetings, I'm pretty new at ASP/SQL so if this seems like a no brainer, please enlighten me. I have a form that is being used to track volunteer activities for employees in my company. The...
0
7044
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
6908
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
7045
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
6944
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...
0
5341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4782
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
2995
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...
0
2985
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
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.