PC Review


Reply
Thread Tools Rate Thread

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

 
 
Darren Clark
Guest
Posts: n/a
 
      24th Feb 2004
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





 
Reply With Quote
 
 
 
 
Darren Clark
Guest
Posts: n/a
 
      24th Feb 2004
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" <(E-Mail Removed)> wrote in message
news:403ab08f$0$22529$(E-Mail Removed)...
> 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
>
>
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing an argument from a query to a command benforum via AccessMonster.com Microsoft Access 1 29th Feb 2008 09:06 PM
Passing an argument from a query to a command benforum via AccessMonster.com Microsoft Access Queries 0 29th Feb 2008 07:16 PM
Passing an argument from a query to a command benforum via AccessMonster.com Microsoft Access Queries 0 29th Feb 2008 07:16 PM
Passing an argument from a query to a command benforum via AccessMonster.com Microsoft Access Queries 0 29th Feb 2008 07:15 PM
Passing an argument from a query to a command benforum via AccessMonster.com Microsoft Access 0 29th Feb 2008 07:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:19 AM.