passing a controls state from one page to another

hi,

i have a menu-control, which is used in more then one page.
no i want to save the state of the menu (which item is selected i.e.) in page 1 and
read it again from page 2 to keep the selection alive?
the selection should be down by clicking hyperlinks in the menu control.
are there other ways apart from querystring?
regards

Alex
0
AZeitler
10/2/2003 4:34:08 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

5 Replies
606 Views

Similar Articles

[PageSpeed] 23

You may try Session variable.
This posting is provided "AS IS" with no warranties, and confers no rights.
0
jimmym
10/2/2003 5:18:51 PM
thanks, how about performance when having much users and session objects?
regards

Alex
0
AZeitler
10/2/2003 5:20:30 PM
i think, there is another problem: when clicking on a hyperlink, i'm still on the new page, so i can't write the session without getting the value using the querystring. Or when using a linkbutton, i will get the value after a postback and have to do a server.transfer after this.

Or am i thinking wrong?
regards

Alex
0
AZeitler
10/2/2003 5:33:01 PM
If you are using "Server.Transfer", you can put values into the Context.Items dictionary, which is similar to Session and Application, except that it lasts only for the current request. (search for  HttpContext  in MSDN).
This posting is provided "AS IS" with no warranties, and confers no rights.
0
jimmym
10/3/2003 1:51:02 AM
thanks, i'll try this.
regards

Alex
0
AZeitler
10/3/2003 12:33:36 PM
Reply:

Similar Artilces:

How to databind control in one web page from another web page
Hi all,  I have a listbox control and a button control in a web page. Once the user clicks the button another web page is opened. The new web page will accept some data from the user which will be used to databind the listbox in the first web page. In other words, the two web pages ( the parent window and the child window) are open at the same time. The child page needs to databind a control in the parent page. Is there a way to do it? I need some code. Thx in advance Update: I hate to do this. Looks like I will have to take help of viewstate and session si...

About passing grid cell value from one page to another web page
 Question: How do I extract the grid cell value and pass it to another page ? in general what is the best way to pass a variable from one page to another ?  Kind Regads,   You could use something likeint grandtotal = 0;int cellVal;foreach (GridViewRow row in GridView1.Rows){String cellText = row.Cells[0].Text;            if (Int32.TryParse(cellText, out cellVal) == true){grandtotal += cellVal;}}expendLabel.Text = grandtotal.ToString(); to extract a grid cells data. The best possible method to send data from one page to...

How To Pass an ItemId from one ascx control to another ascx control in the same page
Hi All, I am new to Asp 2.0. previously i worked on DotNetNuke. now i shifted to this asp 2.0. and here i am developing a site in that site i am using controls just like modules in the dotnetnuke. so i got one doubt here that is in the dotnetnuke if i want to pass an id from one ascx control to another ascx control there i used EditUrl function so it is very simple. but here there is not such a function for navigation from one ascx control to another ascx control. so can any body help me regarding this.Regards,Ram Mohan Rao Adduri,Techinical Associate,eSymbiosisHyderabad.Mobile: 9490118545...

passing a variable form one page to a sql query in another page
hi, i have a categories page and when the user clicks on a category it is to go to a products page which list all the products in that category. i cant believe it can be that difficult. ive been all round the block on this and have posted a number of messages on another forum but the trail went cold. the story so far... http://www.sitepoint.com/forums/showthread.php?t=396963 any help would be muchly much appreciated! You have several options:  QueryString: You can use querystrings to pass variables from one page to another.  If you are using ASP.NET 2.0, you can use Cross ...

how to navigate the url page in one web application page to another web application page
In my project one solution have 2 web apllications in one folder.like 1.webapplication1 2.webapplication2. in firt webapplication1 i created one aspx page like sample.axpx. in second webapplication2 i created one aspx page like sample2.aspx... in sample2.aspx page have hyperlinl. I need to navigate this hyperlink when i click it go to the sample.axpx. how can i write navigate url for this...help me. ..thanks  As i understand u, you need Multi Project soltuionsee this link, http://community.rainbowportal.net/blogs/jonathans_rainbow_blog/archive/2006/02/19...

How to open another web page from one web page
Hi, I am writing an asp.net(C#) 2.0 web page with a link to another web page by clicking a button control on the page, so how can I link it in the codes? I cannot access another aspx page class within the current aspx page class.  Thanks If you need to re-direct the user to another page after pressing your Button, then use the Response.Write method like so: Response.Redirect("~/Default.aspx")Thanks, EdMicrosoft MVP - ASP/ASP.NET 1) Response.Redirect( "Destination PageName");2) Response.Transfer("Destination PageName");3) Hyperlink(  set Url="...

Passing Values from a Web Form to Another Web Form
Hello All! I am trying to pass values from one web form to another web form. I know that there are 3 ways of doing this: queryString, Server.Transfer and Session. I am using the Server.Transfer method. But I am not able to create, in my 2nd web form, an instance of my 1st web form. My 1st Web form is named CallTrack.aspx and my 2nd is named Export.aspx. What I mean is something like this: Public value as CallTrack. I can't create it in my 2nd web form because when the intellisense is displayed, there's no CallTrack in the options. Thanks!   How about using cross-...

Multiple Page Web-forms, without passing earlier pages values to the next one?
I am using RH9, postgreSQL and perl5. Is it possible to get users to submit multiple page web-forms but not to pass values from one form to the next? I would like to store each page to the database server as it is submitted. Also, to build in the process to resume the web-form submission at a later time e.g say there are twent pages to submit and the user stops feeding the forms at the tenth form. I would like to email the user a reminder so he can log back in and start from the eleventh form. Can anyone tell me if this sort of thing is implemented anywhere, so I can study it. Or, can anyone p...

synchronizing chunk of data of one web form for another web form
I'm making a web application. In one web form; i'm taking inputs from user. Now; there is some info given by user in this page which is needed for web form which is going to be displayed next. i want to display that info automatically on that web form so that user doesn't have to re-input that info in this next web form. Info from first page would be inserted into database when user clicks on the submit button. then that next web form would be displayed. and the chunk of info from previous page should be displayed there!!! how can i do this?? cany anybody help?? nobody can help me!! I...

Is it possible to embed part of one web page into another web page?
Any answers will be highly appreciated.  Thanks. If you can adjust the page you want to embed onto the other page, you could use a .ascx (web forms control).  Then you can add controls to it and just drag and drop it using VS.NET from the Solution Explorer window to the webform.  You can then also embed it onto other pages in that same web project easily by drag n drop.  I hope this helps, it's not exactly a portion of a web page but may be an acceptable alternative for you.Rachel AppelMVP - ASPInsider In order to better answer this, I could use some details as ...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Passing values from one web control to another.
I'm trying to pass a value from one user control to another. Basically, the first user control selects an id number and then the second user control takes that id number and updates a record in a database. I have the second control set up to accept values using public string idnumber; public string IDnumber { set { idnumber = value; } } The second user control has two buttons that do postbacks, depending on which is clicked, a value is updated in the database identified by this number. The problem I am having is that before I click th...

Passing data from one web form to another
I want to have a web form that passes data to another form. I searched high and low for how to do this and found the following "solutions". 1) Stick the data in a Session variable and then use Response.Redirect or Server.Transfer to go to the new page. Problems: I have avoided using Session so far, and would prefer to keep it that way. Why that is is beyond the scope of this post. Read up on Session if you don't know the reasons. 2) Put the data in the QueryString and use Response.Redirect or Server.Transfer to go to the new page. Problems: I don't want the data to be v...

passing more than one value from the formview control to another page
 Hi Guys  thanks for all the help on these forums. i need to pass more than one value from the formview control which is bound to a database, to another page using sessions, i currently use the Session["ProductName"] = FormView1.SelectedValue; but would like to also pass values such as the product description and other info.ie pass more than one value from formview to another .aspx page.hope you can help  Many Thanks  Is this additional field stored within the DataKeys collection? The SelectedValue simply pulls the first field out of the DataKeys col...

Web resources about - passing a controls state from one page to another - asp.net.web-forms

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Firefighters battle out of control bushfire in Bullsbrook
Around 70 firefighters are battling an out of control bush-fire in Bullsbrook.

Firefighters battle out of control bushfire in Bullsbrook
Around 70 firefighters are battling an out of control bush-fire in Bullsbrook.

Firefighters battle out of control bushfire in Bullsbrook
Around 70 firefighters are battling an out of control bush-fire in Bullsbrook.

Firefighters battle out of control bushfire in Bullsbrook
Around 70 firefighters are battling an out of control bush-fire in Bullsbrook.

As it happened: Fire crews battle out-of-control blazes in southern states
Emergency warnings are in place for a fire burning in Victoria's north-east while fire crews also tackle blazes in ACT, NSW and Tasmania.

Dell Issues Patch For Content Adaptive Brightness Control On The XPS 13
... issues, as all devices do. One that was very frustrating to deal with during the review was the aggressive Content Adaptive Brightness Control ...

Taliban forces take control of key district in Afghanistan's Helmand province
CNN Taliban forces take control of key district in Afghanistan's Helmand province CNN Kabul, Afghanistan (CNN) Taliban forces have taken almost ...

San Bernardino Gun Control Poll
Would Tougher Gun Control Laws Prevent Mass Shootings In California? [question q=”1″] [email][submit] *Completing this poll entitles you to Daily ...

How Sepp Blatter Lost Control Of His Monster
If Sepp Blatter could take a step back and look at the bigger picture, forgetting for a moment that today’s eight-year ban from all soccer activities ...

Resources last updated: 12/22/2015 2:20:03 PM