I
Ivan Demkovitch
Hi!
I'm building my portal and I found that some times I need to dinamically
generate address.
Since I have many modules and each could have it's own parameters in order
to preserve other's modules stuff I try to preserve
Query string:
string GetQueryString()
{
string s = "";
foreach(string str in Request.QueryString)
s += str + "=" + Request.QueryString[str] + "&";
//If not empty then cut off last parameter:
if (s.Length != 0) s = s.Remove(s.Length-1, 1);
return s;
}
//add's parameter to passed query string. Or updates if was there.
string AddToQueryString(string str_QueryString, string str_Param, string
str_Value)
{
}
Then I add my parameters. Each module does same thing and this way user will
expirience full state maintenance when browse within single "page"
My questions:
1. Is it something common? And if yes then my functions most likely already
in .NET. What are they?
2. I don't like to have same function in each module, how can I move it out?
I remember there was a class which don't have to be initialized. What is
this class? I would use it for my common functions.
Thanks!
I'm building my portal and I found that some times I need to dinamically
generate address.
Since I have many modules and each could have it's own parameters in order
to preserve other's modules stuff I try to preserve
Query string:
string GetQueryString()
{
string s = "";
foreach(string str in Request.QueryString)
s += str + "=" + Request.QueryString[str] + "&";
//If not empty then cut off last parameter:
if (s.Length != 0) s = s.Remove(s.Length-1, 1);
return s;
}
//add's parameter to passed query string. Or updates if was there.
string AddToQueryString(string str_QueryString, string str_Param, string
str_Value)
{
}
Then I add my parameters. Each module does same thing and this way user will
expirience full state maintenance when browse within single "page"
My questions:
1. Is it something common? And if yes then my functions most likely already
in .NET. What are they?
2. I don't like to have same function in each module, how can I move it out?
I remember there was a class which don't have to be initialized. What is
this class? I would use it for my common functions.
Thanks!