Skip to main content
Participant
August 27, 2008
Question

Forming links in ASP.NET

  • August 27, 2008
  • 1 reply
  • 253 views
Hi, I have a link: <a href=pottery.aspx?category=Tranquil&DataSet1_currentPage="& (i-1) &">" & i &"</a>
that i need to change so that category=Tranquil becomes the value out of may data set for any category
<%# DataSet1.FieldValue("category", Container) %>. How can i do this?

The code is from a pager for a repeater:

The current page: <%# DataSet1.CurrentPage + 1%>
The total number of pages: <%# DataSet1.LastPage +1%>

<% dim i as integer
for i=1 to (DataSet1.LastPage+1)
if (DataSet1.CurrentPage + 1)=i then
response.Write("<font color=#FF0000><strong>" & i &"</strong> </font> ")
else
response.Write("<a href=saucy.aspx?category=Tranquil&DataSet1_currentPage="& (i-1) &">" & i &"</a> ")
end if
next%>

Any help would be amazing!
This topic has been closed for replies.

1 reply

Inspiring
September 1, 2008
Yes, amazing. It is amazing how long it will take to read a half dozen
documents that explain how to rewrite a URL but that's what you'll have to
search for and read.

"Bauhaus Boy" <webforumsuser@macromedia.com> wrote in message
news:g94nts$1tf$1@forums.macromedia.com...
> Hi, I have a link: <a
> href=pottery.aspx?category=Tranquil&DataSet1_currentPage="& (i-1) &">" & i
> &"</a>
> that i need to change so that category=Tranquil becomes the value out of
> may
> data set for any category
> <%# DataSet1.FieldValue("category", Container) %>. How can i do this?
>
> The code is from a pager for a repeater:
>
> The current page: <%# DataSet1.CurrentPage + 1%>
> The total number of pages: <%# DataSet1.LastPage +1%>
>
> <% dim i as integer
> for i=1 to (DataSet1.LastPage+1)
> if (DataSet1.CurrentPage + 1)=i then
> response.Write("<font color=#FF0000> " & i &" </font> ")
> else
> response.Write("<a
> href=saucy.aspx?category=Tranquil&DataSet1_currentPage="&
> (i-1) &">" & i &"</a> ")
> end if
> next%>
>
> Any help would be amazing!
>