- Joined
- Feb 24, 2007
- Messages
- 189
- Reaction score
- 1
Hey does anyone know how to code ASP.NET J# because im kind of in a dead lock.
On my virtual directory I have my default.aspx file. however I have a Page_Load function that reads one of my classes which gets the calling file.
but just for a test I decided to do the following
Ok I got that out of the way but when i call my Default.aspx file. the title shows up as "Revolution Gamers - Default.aspx" and its not showing what I instructed it to show. how come? or should I change that and put it inside the StringBuilder?
On my virtual directory I have my default.aspx file. however I have a Page_Load function that reads one of my classes which gets the calling file.
but just for a test I decided to do the following
PHP:
protected void Page_Load(Object sender, EventArgs e)
{
String part = "Revolution Gamers - ";
String part2 = "";
part2 = System.IO.Path.GetFileName(HttpContext.get_Current().get_Request().get_FilePath());
if (part2 == "default.aspx" ||
part2 == "Default.aspx")
{
part2 = "Index";
}
else
{
}
StringBuilder sb = new StringBuilder();
sb.Append(part);
sb.Append(part2);
set_Title(sb.toString());
}
Ok I got that out of the way but when i call my Default.aspx file. the title shows up as "Revolution Gamers - Default.aspx" and its not showing what I instructed it to show. how come? or should I change that and put it inside the StringBuilder?