Saturday, March 31, 2012

There is an invalid sequence in the string. Error problem

I have this below in a Datalist:-
<asp:HyperLink id="Hyperlink1" Cssclass="MenuUnselected" Text='<%#
DataBinder.Eval(Container.DataItem, "cat_cities")%>'
NavigateUrl='<%# "../Showcrete.aspx?CategoryID=" &
DataBinder.Eval(Container.DataItem, "mcatid")& "&CitName=" &
DataBinder.Eval(Container.DataItem, "cat_cities") & "&s=" &
Container.ItemIndex %>'
runat="server" />
But i get error:- Invalid URI: There is an invalid sequence in the string. "
What could be the problem!!!You should replace <%# "../Showcrete.aspx?CategoryID=" &
DataBinder.Eval(Container.DataItem, "mcatid")& "&CitName=" &
DataBinder.Eval(Container.DataItem, "cat_cities") & "&s=" &
Container.ItemIndex %>'
with
<%#
String.Format(".../Showcrete.aspx?CategoryID={0}&CitName={1}&s={2}",
((DataRowView)Container.DataItem)["mcatid"],
((DataRowView)Container.DataItem)["cat_cities"],
Container.ItemIndex) %>
Regards,
Tasos
Patrick.O.Ige wrote:
> I have this below in a Datalist:-
> <asp:HyperLink id="Hyperlink1" Cssclass="MenuUnselected" Text='<%#
> DataBinder.Eval(Container.DataItem, "cat_cities")%>'
> NavigateUrl='<%# "../Showcrete.aspx?CategoryID=" &
> DataBinder.Eval(Container.DataItem, "mcatid")& "&CitName=" &
> DataBinder.Eval(Container.DataItem, "cat_cities") & "&s=" &
> Container.ItemIndex %>'
> runat="server" />
> But i get error:- Invalid URI: There is an invalid sequence in the string.
"
> What could be the problem!!!
I'm getting frustrated with this error i'm using :-
Dim link As String =
String.Format("../Showcrete.aspx?CategoryID={0}&CitName={1}&s={2}",
e.Item.DataItem("mcatid"), e.Item.DataItem("cat_cities"), e.Item.ItemIndex)
Still getting the same error
What could be wrong!!!!!!!!!!!!!!!
"Tasos Vogiatzoglou" <tvoglou@.gmail.com> wrote in message
news:1151847930.414392.191900@.b68g2000cwa.googlegroups.com...
> You should replace <%# "../Showcrete.aspx?CategoryID=" &
> DataBinder.Eval(Container.DataItem, "mcatid")& "&CitName=" &
> DataBinder.Eval(Container.DataItem, "cat_cities") & "&s=" &
> Container.ItemIndex %>'
> with
> <%#
> String.Format(".../Showcrete.aspx?CategoryID={0}&CitName={1}&s={2}",
> ((DataRowView)Container.DataItem)["mcatid"],
> ((DataRowView)Container.DataItem)["cat_cities"],
> Container.ItemIndex) %>
> Regards,
> Tasos
> Patrick.O.Ige wrote:
>

0 comments:

Post a Comment