I have a .aspx page which shows item list. Currently it displays www.site.com/Catalog.aspx?mid=228 which need to be www.site.com/CellPhone/blackbery/sprint/Q10.aspx. All items are displayed in DataList and on button click the Hyperlink redirect to Catalog.aspx with query string 'id' which is the device id.
Now, I have build URL for LinkButton as 'CellPhone/blackbery/sprint/228' dynamically and for other items too. which
`Dynamic Links Examples:
www.site.com/CellPhone/blackbery/sprint/228 needs to rewrite as www.site.com/CellPhone/blackbery/sprint/Q10.aspx currently shows as www.site.com/Catalog.aspx?mid=228
2 www.site.com/iPhone/iPhone5c/verizon/229 needs to rewrite as www.site.com/iPhone/iPhone5c/verizon/AppleiPhone5C.aspx and currently it show as www.site.com/Catalog.aspx?mid=229
Fixed Querystrings:
MainCategory=Cellphone
Category=blackbery
carrier=sprint
id=228
Global.asax
<%@ Application Language="C#" %>
<%@ Import Namespace="System.Web.Routing" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
RegisterRoute(System.Web.Routing.RouteTable.Routes);
}
void RegisterRoute(RouteCollection routes)
{
routes.MapPageRoute("44", "{cat}/{carrier}/{devices}/{id}.aspx", "~/Catalog.aspx");
}
void Application_End(object sender, EventArgs e)
{
// Code that runs on application shutdown
}
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
}
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
}
void Session_End(object sender, EventArgs e)
{
}
void Application_BeginRequest(object sender, EventArgs e)
{
}
</script>
All works fine but the css on the page get distorted.
Please help to resolve css issue! None of the css get applied!
:(