•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,508 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,673 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2244 | Replies: 0
![]() |
•
•
Join Date: Sep 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
This is an example of Server.Transfer and Context Handler.
Through this we can get the multiple values of previous form.
http://www.hanusoftware.com
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>");
}
}
}
Software Development Company
Through this we can get the multiple values of previous form.
http://www.hanusoftware.com
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>");
}
}
}
Software Development Company
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
.net .net framework 3.0 access ajax asp backup beta broadband business centro code combo custom daniweb data data transfer database dell developer development dom dropdownlist feed google internet linux longhorn mail microsoft module msdn net news novell office reader reuse server skin software sql suse theme weather web windows windows server windows workflow xml xoap
- ASP.NET wizard control (ASP.NET)
- PostBackUrl (ASP.NET)
- Cross-Page PostBack with grouped RadioButtons (ASP.NET)
- request.form is not working in asp.net (ASP.NET)
- HttpContext (VB.NET)
- HttpContext.Current Question (VB.NET)
- Help on ASP pages parameters transfer (ASP)
Other Threads in the ASP.NET Forum
- Previous Thread: Create and write a text file that saved in network folder
- Next Thread: Example of Image Upload


Linear Mode