Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need data available several aspx pages down. 1

Status
Not open for further replies.

milliKidd

Programmer
Jul 24, 2008
10
US
Hello .Net Experts,

here's something that I just can't seem to get a handle on. What I am basically trying to do is have the user enter their email address on one of the very first pages that they come to, and then later, and what I mean by later is, several aspx pages down, be able to get to that email address on another page. I have been combing the internet trying to figure out the best way to do this. I don't want to do the session thing because some of our clients may have cookies disabled. See, this is going to be one of the very first pages that they come to. Then on like, the very last page, just before they submit the form, there is a radio button list that's laid out like so:

Code:
<asp:RadioButtonList ID="rblConfirmationSentAddr" TabIndex="30" runat="server" RepeatDirection="Vertical" RepeatLayout="Table">
             <asp:ListItem Value="Non">Enter an email address not on this form.</asp:ListItem>
             <asp:ListItem Value="Emp">Use the employer email address entered on this form.</asp:ListItem>
</asp:RadioButtonList>

Where "Use the employer email address entered on this form." is the email that they entered on the first page. I have considered the 3 methods of, you know, Server.Transfer, Response.Redirect, and Cross Page Postbacks but I want to know what YOU guys say is the BEST and/or SAFEST way to do this. Please note that I am pretty new to development. Only about 2 years now, and security is my utmost concern. Also, the information is saved in a database as the clients will be moving from page to page. One more thing, I kind of have an idea as to how to retrieve the data with javascript on the radiobutton click event as I have this in my Page_Load event on the last page:

Code:
 If Not Page.IsPostBack Then
            rblConfirmationSentAddr.Attributes.Add("onclick", "FillEmailBox();")
 End If

And then in my aspx page on the last page:

Code:
<script language="javascript" type="text/javascript">
                function FillEmailBox()
                {
               
                var rdolist_0 = document.getElementById("rblConfirmationSentAddr_0");
                var rdolist_1 = document.getElementById("rblConfirmationSentAddr_1");
               
                if (rdolist_0.checked)
                    //do stuff to clear out box so client can enter an email address in the box
                if (rdolist_1.checked)
                    //stick email address in the box that the client entered from the first page
                }

</script>

There are 2 other pages where I want to do this same thing, I just need to know how to get to the data to fill some textboxes when I click the different buttons on the radiobuttonlist. For example, I have two other pages named employmentaddress.aspx and the next page is address.aspx. When the user enters their employer address info and clicks the "Next Page" button to move to address.aspx to enter their home address info, I have another radiobuttonlist laid out like this:

Code:
<asp:RadioButtonList ID="rblMailingAddress" runat="server" RepeatDirection="Vertical" RepeatLayout="Table" TabIndex="120">
        <asp:ListItem Value="Res">This address is the same as my current resident address.</asp:ListItem>
        <asp:ListItem Value="Bus">This address is the same as my current employment address.</asp:ListItem>
        <asp:ListItem Value="Sep">I have a separate mailing address.</asp:ListItem>
</asp:RadioButtonList>

What I want to do here is when the user clicks "This address is the same as my current employment address." it populates some textboxes I have on this page (address.aspx) with their address info from the previous page (employmentaddress.aspx). Is this at all possible to do, or am I just dreaming? (-: That would be SWEET if I could get this to work!!

Thanks in advance...I am using Visual Studio 2005 .Net 2.0 with VB.Net

milli
 
Okay thanks jbenson, so how about security, because I want to do something similar to this on some other pages too. It's not going to be anything VERY sensitive, just a regular address, but I still wouldn't want someone's address leaking out to the public. Know what I mean? Not even their email -- to spammers and the like. (-:

Thanks,

milli...
 
Okay I see what you're saying, so just set sessionState cookieless="true" and then encrypt the query string?
 
Thanks buddy, you have answered my question.

milli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top