Click here to Skip to main content
15,920,596 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Page Invisible Pin
Amit Kumar G5-Jan-07 4:09
Amit Kumar G5-Jan-07 4:09 
GeneralRe: Page Invisible Pin
Venkatesh Mookkan7-Jan-07 15:51
Venkatesh Mookkan7-Jan-07 15:51 
GeneralRe: Page Invisible Pin
indian1437-Jan-07 18:23
indian1437-Jan-07 18:23 
QuestionProblem with button click event handler Pin
Tina P4-Jan-07 18:11
Tina P4-Jan-07 18:11 
AnswerRe: Problem with button click event handler Pin
Christian Graus4-Jan-07 18:30
protectorChristian Graus4-Jan-07 18:30 
GeneralRe: Problem with button click event handler Pin
Tina P5-Jan-07 5:38
Tina P5-Jan-07 5:38 
GeneralRe: Problem with button click event handler Pin
Christian Graus5-Jan-07 19:18
protectorChristian Graus5-Jan-07 19:18 
GeneralRe: Problem with button click event handler Pin
Tina P6-Jan-07 13:46
Tina P6-Jan-07 13:46 
Hi Christian, yup when you told me in your response prior to this one, that I should try the PreRender method, I did that. And I did go into the designer generated code and explicitly wired the event handler for the pre render event (this.PreRender+=new System.EventHandler(this.Page_PreRender)).

Then I copied the same code that I have in my load event handler into Page_PreRender event handler. i.e.

<br />
public void Page_PreRender(object sender, System.EventArgs e)<br />
		{<br />
			if (!IsPostBack)<br />
			{<br />
				HttpCookie cookie = Response.Cookies["preferences1"];<br />
				ViewState["Referer"] = Request.Headers["Referer"];<br />
          <br />
				if ( cookie != null )<br />
				{<br />
					BackColor.SelectedItem.Value = (string)cookie.Values["BackColor"];<br />
					ForeColor.SelectedItem.Value = (string)cookie.Values["ForeColor"];<br />
					LinkColor.SelectedItem.Value = (string)cookie.Values["LinkColor"];<br />
					FontSize.SelectedItem.Value = (string)cookie.Values["FontSize"];<br />
					FontName.SelectedItem.Value = (string)cookie.Values["FontName"];<br />
					navControl.SelectedItem.Value = (string) cookie.Values["navControl"];<br />
				}<br />
			}<br />
userControl.Visible=false;<br />
<br />
		}<br />


<br />
public void btnSubmit_Click(object sender, System.EventArgs e)<br />
		{<br />
			HttpCookie cookie = new HttpCookie("preferences1");<br />
			cookie.Values.Add("ForeColor",ForeColor.SelectedItem.Value);<br />
			cookie.Values.Add("BackColor",BackColor.SelectedItem.Value);<br />
			cookie.Values.Add("LinkColor",LinkColor.SelectedItem.Value);<br />
			cookie.Values.Add("FontSize",FontSize.SelectedItem.Value);<br />
			cookie.Values.Add("FontName",FontName.SelectedItem.Value);<br />
			cookie.Values.Add("navControl", navControl.SelectedItem.Value);<br />
			Response.AppendCookie(cookie);<br />
<br />
if(GetStyle("navControl") == "Top")<br />
				theControl.Visible = true;<br />
			if(GetStyle("navControl") == "Bottom")<br />


This code above is pretty much from the Got dot net sitehttp://samples.gotdotnet.com/quickstart/aspplus/doc/stateoverview.aspx[^].

If you could please take a look at the link above for me...then you would see what I'm going through? Just scroll down to the CLIENT SIDE COOKIES on the link above and click view source. You will see they are doing this whole thing with two different pages (cookies.aspx adn customize.aspx) whereas I'm just using one, If you run the sample from there, you will see what I'm talking about. Also the only difference is that I converted those html select (drop down lists controld they have) into web server controls. I wonder if that has something to do with the problem I'm having since it might be going out to the server for no reason?

Thanks once again for all your help.;)

~TINA
GeneralRe: Problem with button click event handler Pin
Christian Graus6-Jan-07 14:24
protectorChristian Graus6-Jan-07 14:24 
GeneralRe: Problem with button click event handler Pin
Tina P6-Jan-07 15:27
Tina P6-Jan-07 15:27 
GeneralRe: Problem with button click event handler Pin
Christian Graus6-Jan-07 15:38
protectorChristian Graus6-Jan-07 15:38 
GeneralRe: Problem with button click event handler Pin
Tina P6-Jan-07 16:59
Tina P6-Jan-07 16:59 
GeneralRe: Problem with button click event handler Pin
Christian Graus6-Jan-07 23:23
protectorChristian Graus6-Jan-07 23:23 
GeneralRe: Problem with button click event handler Pin
Tina P7-Jan-07 8:16
Tina P7-Jan-07 8:16 
GeneralRe: Problem with button click event handler Pin
Christian Graus7-Jan-07 9:13
protectorChristian Graus7-Jan-07 9:13 
GeneralRe: Problem with button click event handler Pin
Tina P7-Jan-07 10:32
Tina P7-Jan-07 10:32 
QuestionRe: Problem with button click event handler Pin
Tina P7-Jan-07 11:03
Tina P7-Jan-07 11:03 
Questionproblem dropdownlist Pin
mohd imran abdul aziz4-Jan-07 18:04
mohd imran abdul aziz4-Jan-07 18:04 
AnswerRe: problem dropdownlist Pin
Jay_se4-Jan-07 19:06
Jay_se4-Jan-07 19:06 
AnswerRe: problem dropdownlist Pin
Venkatesh Mookkan4-Jan-07 19:30
Venkatesh Mookkan4-Jan-07 19:30 
QuestionSearch keyword in set of documents stored using Sharepoint Pin
Member 36858894-Jan-07 17:07
Member 36858894-Jan-07 17:07 
QuestionProblem in setting up auto signout when closing the application browser window Pin
Renukapadhamanaban4-Jan-07 14:40
Renukapadhamanaban4-Jan-07 14:40 
AnswerRe: Problem in setting up auto signout when closing the application browser window Pin
Not Active4-Jan-07 15:50
mentorNot Active4-Jan-07 15:50 
GeneralRe: Problem in setting up auto signout when closing the application browser window Pin
Venkatesh Mookkan4-Jan-07 16:43
Venkatesh Mookkan4-Jan-07 16:43 
GeneralRe: Problem in setting up auto signout when closing the application browser window Pin
Not Active4-Jan-07 16:53
mentorNot Active4-Jan-07 16:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.