|
|
|
start date: Thu, 16 Aug 2007 13:51:47 -0400,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
sloan
|
|
2
Ladislav Mrnka
|
LinkButton inside a Repeater //OnClientClick //No more quote options
Asp.Net 2.0
Inside a repeater, I'm trying to do a linkbutton with a OnClientClick
<asp:LinkButton ID="lnbSelect" runat="server"
OnClientClick="location.href='anotherpage.aspx?UserUUID=abc';return
false;">Select</asp:LinkButton>
the above line works, but notice i have a hard coded UserUUID of abc
When I try to go to this:
<asp:LinkButton ID="lnbSelect" runat="server"
OnClientClick="location.href='anotherpage.aspx?UserUUID=<%#
DataBinder.Eval(Container.DataItem, "UserUUID")%>';return
false;">Select</asp:LinkButton>
Notice, after
UserUUID=
I have a
<%# DataBinder.Eval(Container.DataItem, "UserUUID")%>
It craps out because......I'm using too many (sets of) quotes, and have run
out of my single vs double quotes.
Anybody know how to pull this off.
Date:Thu, 16 Aug 2007 13:51:47 -0400
Author:
|
RE: LinkButton inside a Repeater //OnClientClick //No more quote optio
Hi,
try to use following data binding expression:
OnClientClick='<%# DataBinder.Eval(Container.DataItem, "UserUUID",
"location.href='anotherpage.aspx?UserUUID={0}'; return false;") %>'
Best regards,
Ladislav
"sloan" wrote:
> Asp.Net 2.0
>
> Inside a repeater, I'm trying to do a linkbutton with a OnClientClick
>
>
> <asp:LinkButton ID="lnbSelect" runat="server"
> OnClientClick="location.href='anotherpage.aspx?UserUUID=abc';return
> false;">Select</asp:LinkButton>
>
>
>
> the above line works, but notice i have a hard coded UserUUID of abc
>
> When I try to go to this:
> <asp:LinkButton ID="lnbSelect" runat="server"
> OnClientClick="location.href='anotherpage.aspx?UserUUID=<%#
> DataBinder.Eval(Container.DataItem, "UserUUID")%>';return
> false;">Select</asp:LinkButton>
>
> Notice, after
>
> UserUUID=
>
> I have a
> <%# DataBinder.Eval(Container.DataItem, "UserUUID")%>
>
> It craps out because......I'm using too many (sets of) quotes, and have run
> out of my single vs double quotes.
>
>
>
> Anybody know how to pull this off.
>
>
>
Date:Thu, 16 Aug 2007 18:01:49 -0700
Author:
|
|
|