Dynamically change the previous page

Posted by Suju_jm under Regular Expressions on 9/1/2009 | Views : 2011 | Status : [Member] | Replies : 6
I want to change the previous page property dynamically through cs coding.




Responses

Posted by: Vuyiswamb on: 9/1/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good day Suju_jm

Yes there is way to change the Properties of your page on the Server side. but the problem is that we cant know what properties you want to change until you tell us exactly what is your problem.

Thank you for posting at dotnetfunda

Vuyiswa Maseko


Thank you for posting at Dotnetfunda
[Administrator]

Suju_jm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakhangarg on: 9/1/2009 [Member] [Moderator] Silver

Up
0
Down
Hi-

Can you tell me why you want to change the property on previous page.. i mean what is the use of that...
Use server.transfer to redirect on next page and then you can use the page.PreviousPage property to access the control of previous page.

Thanks
Lakhan Pal Garg

Suju_jm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Suju_jm on: 9/1/2009 [Member] Starter

Up
0
Down
my page doent hav the fixed previous page.
it gets changed .since i want that.

Suju_jm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/1/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
I cant seem to understand your problem still my. Can you please try again and Explain clearly.

Thank you for Posting at Dotnetfunda


Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Suju_jm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rameshsahu on: 9/1/2009 [Member] Starter

Up
0
Down
use cal back method for each control which u want to change the property.

Suju_jm, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rtpharry on: 9/3/2009 [Member] [MVP] Bronze

Up
0
Down
If you mean Page.PreviousPage then it is a readonly property:

http://msdn.microsoft.com/en-us/library/system.web.ui.page.previouspage.aspx

You could create a new method on the page that checks the previous page and makes decisions based on it.


If you want to actually change the contents of a previously visited page then you will have to make the previous page into something that is databound like formview, gridview etc. Then you can make changes to the database and when the previous page is visited next it will show the new database.

Suju_jm, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response