By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,677 Members | 1,298 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,677 IT Pros & Developers. It's quick & easy.

passing parameter

P: n/a
need to passing parameter from 1st page to 2nd page...

try to use
public static void user_param(string namaku ,string umurku ) but still
cannot why??

please help...
--
:: KHAMAL ::
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Khamal wrote:
need to passing parameter from 1st page to 2nd page...

try to use
public static void user_param(string namaku ,string umurku ) but still
cannot why??

please help...
KHAMAL ::


You can't transfer values via parameters, because that second page
is (probably) called in a separate request. Then it would be a different
instance, so any passed values are ignored.
For "static" members you don't need an instance, BUT then that value
would be shared between all instances (read: users) of that page.

Now for the good news, there are several options:
* pass it in the querystring
* use Session to store user-specific data (often a good choice)

Hans Kesting
Nov 19 '05 #2

P: n/a
If you use Server.Transfer to go to the second page, then you can store data
to pass to the second page in HttpContext.Current.Items -- it's a state bag
that lasts for the request.

-Brock
DevelopMentor
http://staff.develop.com/ballen
need to passing parameter from 1st page to 2nd page...

try to use public static void user_param(string namaku ,string umurku
) but still cannot why??

please help...

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.