473,222 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,222 software developers and data experts.

Persisting viewstate information between HTTP/HTTPS?

Is it possible to persist viewstate information between HTTP and HTTPS
(on the same page obviously)? Trying to get around writing some messy
state transfer code... it doesn't seem to work if I use
response.redirect.

Nov 19 '05 #1
4 1813
What about using Server.Transfer which has the ability to preserve the
context of the pevious page ? Or have I misunderstood you ??

Mr N.
"Chris Ashley" <ch***********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Is it possible to persist viewstate information between HTTP and HTTPS
(on the same page obviously)? Trying to get around writing some messy
state transfer code... it doesn't seem to work if I use
response.redirect.

Nov 19 '05 #2

Mr Newbie wrote:
What about using Server.Transfer which has the ability to preserve the
context of the pevious page ? Or have I misunderstood you ??

Mr N.


Sorry, I don't think I explained myself well enough.

Basically I have a webform which is wizard style with a number of
'pages'. The last step needs to use HTTPS but submit to the same form.
I know I can do this using client side script to override the form
action but that's not ideal.

EG:

switch (wizardStep)
{
case 1:
// Needs to be http
infoPanel.Visible = true;
break;
case 2:
// Needs to be http
declarationPanel.Visible = true;
case 3:
// Needs to be https
paymentPanel.Visible = true;
}

I know I can do this by just making a separate form, or adding some
code to pass values across, but just wondered if there was a neater way
that I'm missing?

Thanks,

Chris

Nov 19 '05 #3
Why not use HTTPS for all the stages, will this not work ?


"Chris Ashley" <ch***********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...

Mr Newbie wrote:
What about using Server.Transfer which has the ability to preserve the
context of the pevious page ? Or have I misunderstood you ??

Mr N.


Sorry, I don't think I explained myself well enough.

Basically I have a webform which is wizard style with a number of
'pages'. The last step needs to use HTTPS but submit to the same form.
I know I can do this using client side script to override the form
action but that's not ideal.

EG:

switch (wizardStep)
{
case 1:
// Needs to be http
infoPanel.Visible = true;
break;
case 2:
// Needs to be http
declarationPanel.Visible = true;
case 3:
// Needs to be https
paymentPanel.Visible = true;
}

I know I can do this by just making a separate form, or adding some
code to pass values across, but just wondered if there was a neater way
that I'm missing?

Thanks,

Chris

Nov 19 '05 #4
This may help

If you need to use absolute URLs, resort to a little trick and manually add
the session ID to the URL. You use the ApplyAppPathModifier method on the
HttpResponse class.

<a runat="server"
href=<% =Response.ApplyAppPathModifier("/code/page.aspx")%> >Click</a>
The ApplyAppPathModifier method takes a string representing a URL and
returns an absolute URL, which embeds session information. For example, this
trick is especially useful in situations in which you need to redirect from
a HTTP page to an HTTPS page.
"Chris Ashley" <ch***********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...

Mr Newbie wrote:
What about using Server.Transfer which has the ability to preserve the
context of the pevious page ? Or have I misunderstood you ??

Mr N.


Sorry, I don't think I explained myself well enough.

Basically I have a webform which is wizard style with a number of
'pages'. The last step needs to use HTTPS but submit to the same form.
I know I can do this using client side script to override the form
action but that's not ideal.

EG:

switch (wizardStep)
{
case 1:
// Needs to be http
infoPanel.Visible = true;
break;
case 2:
// Needs to be http
declarationPanel.Visible = true;
case 3:
// Needs to be https
paymentPanel.Visible = true;
}

I know I can do this by just making a separate form, or adding some
code to pass values across, but just wondered if there was a neater way
that I'm missing?

Thanks,

Chris

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
1
by: David Anderson | last post by:
I'm having trouble persisting viewstate information for webcontrols I've disabled via javascript. I have a group of textboxes that I enable/disable via a checkbox control that invokes a javascript...
0
by: Tomas Vera | last post by:
Here's another goofy thing. I need to persist the state of items added dynamically to a Panel control between round-trips to the server. I have a web form that contains a TreeView and a...
1
by: Charlie | last post by:
Hi, Is there a way of persisting state information for a server control without using ViewState? I'm currently using Page.Session() but I don't think this is the best way. What's the preferred...
1
by: lim | last post by:
What is the possible error that occurs when the Page_load event is not triggered during execution. In my page there's some basic server control. Is there any loops holes?
3
by: Stu | last post by:
Hi, I am creating a control in a PlaceHolder like so: Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click Dim ctrl As...
0
by: =?Utf-8?B?SmltRg==?= | last post by:
We are building some new sites using .NET 2.0. We are trying to implement persisting ViewState site wide to SQL (as opposed to on a per application basis). I have successfully got the ViewState to...
1
by: cfps.Christian | last post by:
I have a web usercontrol on the form that dynamically builds itself and then when an item has been clicked it will allow me to get the object at the selected index. The problem I'm having is that...
1
by: =?Utf-8?B?VmlqYXkgQ2hpa3Rl?= | last post by:
Hi Experts, With Session Affinity and Web Server Farm on ISA Server 2006 accessing 2 backend IIS servers, I’m getting error “Validation of ViewState MAC failed. If this application is hosted...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.