Just add attributes into your dropdownlist
for(int i=0; i<=DDL.items.count-1; i++)
{
DDL.Item[i].Attributes.Add("Title", DDL.Item[i].Text)
}
Full Stack Software Developer | Web Developer | Software Developer | Software Development | Angular - Tech-Coder.com | Tech Coder
Sep 30, 2010
Sep 15, 2010
Redirect Permanent from a non-www to a www using ASP.NET
Please add below code into your global.aspx file
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (Request.Url.Authority.StartsWith("www"))
return;
var url = string.Format("{0}://www.{1}{2}",
Request.Url.Scheme,
Request.Url.Authority,
Request.Url.PathAndQuery);
Response.Redirect(url,true);
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (Request.Url.Authority.StartsWith("www"))
return;
var url = string.Format("{0}://www.{1}{2}",
Request.Url.Scheme,
Request.Url.Authority,
Request.Url.PathAndQuery);
Response.Redirect(url,true);
}