473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 3275
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
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
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
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
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
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
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
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
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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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
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,...

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.