Jump to content

example of Server.Transfer and Context Handler

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

example of Server.Transfer and Context Handler Rate Topic: -----

#1 User is offline   hanusoft 

  • W.R. Private
  • Group: Members
  • Posts: 1
  • Joined: 03-September 07

Posted 14 September 2007 - 02:30 AM

This is an example of Server.Transfer and Context Handler.
Through this we can get the multiple values of previous form.

In this page we are displaying data from previous form. We can use this technique for multiple form registration form.

Code (ContextParent.aspx.cs): -

private void Button1_Click(object sender,System.EventArgs e)
		{
		Server.Transfer("ContextChild.aspx");
		}

		internal Hashtable Value
		{
			get
			{
				Hashtable objHT = new Hashtable();
				objHT["Name"]=TextBox1.Text;
				objHT["FathersName"]= TextBox2.Text;
				objHT["Address"] = TextBox3.Text;
				return objHT;
			}
		}

Code (ContextChild.aspx.cs) :-

private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			Hashtable objHT = new Hashtable(); 
			if(!IsPostBack)
			{
				ContextParent ParentPage;
				ParentPage = (ContextParent)Context.Handler;
				objHT = ParentPage.Value;
				Response.Write("<br><br>");
				foreach(DictionaryEntry di in objHT)
				{
					Response.Write(di.Key +" : "+di.Value);
					Response.Write("<br>");
				}
			}
		}

0

#2 User is offline   benbacardi 

  • Administrator
  • Group: Administrators
  • Posts: 1,140
  • Joined: 06-April 06
  • Gender:Male
  • Location:United Kingdom

Posted 14 September 2007 - 03:14 AM

hanusoft, you've posted like this before and we've removed your spammy URLs and such. This might be useful to someone, but if you put it in no context and don't explain it what good is it? It seems you're only posting these for spam reasons, and if another one comes along without explaination and with spammy links, we'll have to take some more serious action.
0

#3 User is offline   Ben Abrams 

  • The buddy system:never fails
  • Group: Administrators
  • Posts: 1,850
  • Joined: 04-April 06
  • Gender:Male

Posted 16 September 2007 - 03:35 PM

I agree.

Your account isnt banned (yet) but your locked up to hell. anything you post now will be moderated first.

View PostSirkent, on 21 September 2007 - 04:26 AM, said:

<monty python high-pitched female voice>I DON'T LIKE SPAM!</monty python high-pitched female voice>
0

#4 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 16 September 2007 - 04:05 PM

:borat:
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users