Im new to both ASP.Net and C# and Im currently working on a homepage
project.
The Server/Request-object is causing some kind of headake for me as
the scope seems somewhat limited. How can I access this from other
functions or methods in the same class? Take
protected void Page_Load(object sender, EventArgs e)
{
contentLabel.Text = returnLanguage();
}
public static string returnLanguage()
{
return Request.QueryString["lang"];
}
This *should* work in my eyes as the Server-object or Request-object
should be globaly available. Is there any other workarounds on this,
or would I need to use
returnLanguage( Request.QueryString["lang"] );
I know passing one little argument is no big deal, but it will be when
I during the process change one detail in the function, and need to
replace the argument-list for all caller functions.
Any thoughts on best practice ?
Best regards,
Rune
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment
You may subscribe to group Feeds using a RSS Feed Reader to stay upto date
using following url
<a href="http://feeds.feedburner.com/DotNetDevelopment">
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---