asp.net c# webpage transforming url redirecting issue

37 Views Asked by At

i am running asp.net c# website and i have tags page. i transform tag page url in global.asax and that new url is working but when i click on page 2 button then url redirecting. here is new url http://localhost:25878/Tag/Applications

here when click on next page then url is showing this format http://localhost:25878/Tag/Applications?Tag=Applications

pagination is gridview auto pagination which is not showing any page numbers in url. here is my global.asax code

if (oldpath.Contains("/tag/"))
{
    string[] words = oldpath.Split('/');
    string lastword = words[words.Length - 1];
    newpath = "/Tags.aspx?Tag=" + lastword;
}

here is my tags.aspx.cs file code

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
    SqlDataSource2.SelectCommand = FormSQL();
}

i am trying that new transform url must not redirect when click on next page. evan i can change this pagination style if not possible with this pagination. Please help to fix this and if not possible then you can help me to explain how can i change pagination style and add page parameters in url.

0

There are 0 best solutions below