HI
when i am using the Rewrite url ,the aspx css are not called But the rewrite URL is Working why?
Plz give me suggestion
Example :
When I am not Using Rewrite URL
Page designe is good (calling all css of that page)
<u><b></b>
When I am Using Rewrite URL
</u>
Page designe is Not good ( css are not called)
i am using Web.config rewrite url
<rewrite url="~/Cardetails/(.+)-(.+).aspx" to="~/MoreCars.aspx?strId=$2">
In .aspx.CS Page
public static string GenerateURL(object Title, object strId)
{
string strTitle = Title.ToString();
#region Generate SEO Friendly URL based on Title
strTitle = strTitle.Trim();
strTitle = strTitle.Trim('-');
strTitle = strTitle.ToLower();
char[] chars = @"$%#@!*?;:~`+=()[]{}|\'<>,/^&"".".ToCharArray();
strTitle = strTitle.Replace("c#", "C-Sharp");
strTitle = strTitle.Replace("vb.net", "VB-Net");
strTitle = strTitle.Replace("asp.net", "Asp-Net");
strTitle = strTitle.Replace(".", "-");
for (int i = 0; i < chars.Length; i++)
{
string strChar = chars.GetValue(i).ToString();
if (strTitle.Contains(strChar))
{
strTitle = strTitle.Replace(strChar, string.Empty);
}
}
strTitle = strTitle.Replace(" ", "-");
strTitle = strTitle.Replace("--", "-");
strTitle = strTitle.Replace("---", "-");
strTitle = strTitle.Replace("----", "-");
strTitle = strTitle.Replace("-----", "-");
strTitle = strTitle.Replace("----", "-");
strTitle = strTitle.Replace("---", "-");
strTitle = strTitle.Replace("--", "-");
strTitle = strTitle.Trim();
strTitle = strTitle.Trim('-');
#endregion
strTitle = "Cardetails/" + strTitle + "-" + strId + ".aspx";
return strTitle;
}