EDN Admin
Well-known member
If I have a user register on this page signup.aspx, I want to fields to be emailed to the admin so that they can manually set up the new user. The user will not be able to use their membership until they have received a confirmation email from the admin.
I know there is a better way to do this, but this is how it is to be done.
My code below for the signup.aspx
<pre class="prettyprint <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="signup.aspx.cs" Inherits="index1.signup2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
<html xmlns="http://www.w3.org/1999/xhtml
<head id="Head1" runat="server
<title>Audit Services Signup</title>
<script type="text/javascript" language="javascript
function yes() {
MMDiv.style.visibility = visible;
MMDiv2.style.visibility = visible;
txt_client.style.visibility = hidden;
lbl_client.style.visibility = hidden;
form1.CarrierScac.focus();
}
function no() {
MMDiv.style.visibility = hidden;
MMDiv2.style.visibility = hidden;
txt_client.style.visibility = hidden;
lbl_client.style.visibility = hidden;
}
function client() {
txt_client.style.visibility = visible;
lbl_client.style.visibility = visible;
MMDiv.style.visibility = hidden;
MMDiv2.style.visibility = hidden;
form1.clientname.focus();
}
</script>
<style type="text/css
.style1
{
font-size: small;
color: #000080;
}
.style2
{
color: #000080;
}
.style5
{
width: 156px;
}
.style6
{
color: #000080;
width: 137px;
}
.style7
{
width: 137px;
}
.style8
{
color:#FF0000;
width: 137px;
}
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td><img src="http://www.company.com/images/spacer.gif" height="1" width="20" alt="line" />A Division</td>
<!-- Display Date -->
<script type="text/javascript" language="JavaScript
<!-- Begin
d = new Array(
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
);
m = new Array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
);
today = new Date();
day = today.getDate();
year = today.getYear();
if (year < 2000)
year = year + 1900;
end = "th";
if (day == 1 || day == 21 || day == 31) end = "st";
if (day == 2 || day == 22) end = "nd";
if (day == 3 || day == 23) end = "rd";
day += end;
document.write("<font face=Verdana, Arial, Helvetica size=1>");
document.write(d[today.getDay()] + ", " + m[today.getMonth()] + " ");
document.write(day + ", " + year);
document.write("</font><img src=http://www.logisource.com/images/spacer.gif height=1 width=20>");
// End -->24.224.117.67
</script>
</tr>
<tr><td valign="top" colspan="2 <img src="http://www.company.com/images/line.gif" height="1" width="100%" alt = "line" /></td></tr>
</table>
<!-- ***************** Main Cell For Body ******************* -->
<table width="100%" border="0" >
<tr>
<td align="center <br />
<table width="100%" >
<tr>
<td align="center
<form id="form1" runat="server
<table border="0" cellpadding="0" cellspacing="1"
style="border-style: solid; border-color: #C0C0C0; border-width: 2px 20px 2px 20px; background-color: #EBEDEC;
<tr>
<td>
<table width="95%" >
<tr>
<td align="center
<table border="0" cellpadding="1" width="95%" >
<tr>
<td colspan="2" align="center <strong style="color: #000080 New User Account Setup <br /><br />
<span class="style1 *Your IP Address Is Being Tracked For Security Purposes<br
class="style1" /> </td>
</tr>
<tr>
<td align="right" class="style6 IP Address: </td>
<td class="style5
<asp:Label ID="Label3" runat="server" Text=" </asp:Label></td>
</tr>
<tr>
<td align="left" valign="middle" class="style6 Are you a Delta Audit: </td>
<td class="style5
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True"
Height="25px" Width="108px"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged"
RepeatDirection="Horizontal
<asp:ListItem Text="Client" Value="Client" Selected="False </asp:ListItem>
<asp:ListItem Text="Carrier" Value="Carrier" Selected="False </asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td class="style6" align="right
<asp:Label ID="Label1" runat="server" Text=" </asp:Label></td>
<td><asp:TextBox ID="tbClient" runat="server" Visible="false" ></asp:TextBox>
</td>
</tr>
<tr>
<td class="style6" align="right
<asp:Label ID="Label2" runat="server" Text=" </asp:Label></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_name" runat="server" Text="Name:" CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_name" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_company" runat="server" Text="Company Name:" CssClass="style2 </asp:Label></td>
<td class="style5
<asp:TextBox ID="txt_company" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_address" runat="server" Text="Address:" CssClass="style2 </asp:Label></td>
<td class="style5
<asp:TextBox ID="txt_address" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7 <asp:Label ID="lbl_city" runat="server" Text="City"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_city" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_state" runat="server" Text="State" CssClass="style2 </asp:Label></td>
<td class="style5
<aspropDownList ID="ddl_state" runat="server" CssClass="style2
<asp:ListItem Value=" </asp:ListItem>
<asp:ListItem Value="AL Alabama</asp:ListItem>
<asp:ListItem Value="AK Alaska</asp:ListItem>
<asp:ListItem Value="AZ Arizona</asp:ListItem>
<asp:ListItem Value="AR Arkansas</asp:ListItem>
<asp:ListItem Value="CA California</asp:ListItem>
<asp:ListItem Value="CO Colorado</asp:ListItem>
<asp:ListItem Value="CT Connecticut</asp:ListItem>
<asp:ListItem Value="DE Delaware</asp:ListItem>
<asp:ListItem Value="DC District of Columbia</asp:ListItem>
<asp:ListItem Value="FL Florida</asp:ListItem>
<asp:ListItem Value="GA Georgia</asp:ListItem>
<asp:ListItem Value="HI Hawaii</asp:ListItem>
<asp:ListItem Value="ID Idaho</asp:ListItem>
<asp:ListItem Value="IL Illinois</asp:ListItem>
<asp:ListItem Value="IN Indiana</asp:ListItem>
<asp:ListItem Value="IA Iowa</asp:ListItem>
<asp:ListItem Value="KS Kansas</asp:ListItem>
<asp:ListItem Value="KY Kentucky</asp:ListItem>
<asp:ListItem Value="LA Louisiana</asp:ListItem>
<asp:ListItem Value="ME Maine</asp:ListItem>
<asp:ListItem Value="MD Maryland </asp:ListItem>
<asp:ListItem Value="MA Massachusetts</asp:ListItem>
<asp:ListItem Value="MI </asp:ListItem>
<asp:ListItem Value="MN Minnesota</asp:ListItem>
<asp:ListItem Value="MS Mississippi</asp:ListItem>
<asp:ListItem Value="MO Missouri</asp:ListItem>
<asp:ListItem Value="MT Montana</asp:ListItem>
<asp:ListItem Value="NE Nebraska</asp:ListItem>
<asp:ListItem Value="NV Nevada</asp:ListItem>
<asp:ListItem Value="NH New Hampshire</asp:ListItem>
<asp:ListItem Value="NJ New Jersey</asp:ListItem>
<asp:ListItem Value="NM New Mexico</asp:ListItem>
<asp:ListItem Value="NY New York</asp:ListItem>
<asp:ListItem Value="NC North Carolina</asp:ListItem>
<asp:ListItem Value="ND North Dakota</asp:ListItem>
<asp:ListItem Value="OH Ohio</asp:ListItem>
<asp:ListItem Value="OK Oklahoma</asp:ListItem>
<asp:ListItem Value="OR Oregon</asp:ListItem>
<asp:ListItem Value="PA Pennsylvania</asp:ListItem>
<asp:ListItem Value="RI Rhode Island</asp:ListItem>
<asp:ListItem Value="SC South Carolina</asp:ListItem>
<asp:ListItem Value="SD South Dakota</asp:ListItem>
<asp:ListItem Value="TN Tennessee</asp:ListItem>
<asp:ListItem Value="TX Texas</asp:ListItem>
<asp:ListItem Value="UT Utah</asp:ListItem>
<asp:ListItem Value="VT Vermont</asp:ListItem>
<asp:ListItem Value="VA Virginia</asp:ListItem>
<asp:ListItem Value="WA Washington</asp:ListItem>
<asp:ListItem Value="WV West Virginia</asp:ListItem>
<asp:ListItem Value="WI Wisconsin</asp:ListItem>
<asp:ListItem Value="WY Wyoming</asp:ListItem>
</aspropDownList></td>
</tr>
<tr>
<td align="right" class="style7 <asp:Label ID="lbl_zipcode" runat="server" Text="Zip Code:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_zipcode" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td
align="right" class="style7 <asp:Label ID="lbl_phone" runat="server" Text="Phone Number:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_phone" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td
align="right" class="style7 <asp:Label ID="lbl_email" runat="server" Text="Email:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_email" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td colspan="2" align="center <br class="style2" /> <span class="style1 Please select a Username and Password. </td>
</tr>
<tr>
<td align="right" class="style7 <asp:Label ID="lbl_username" runat="server" Text="Username:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_username" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td
align="right" class="style7 <asp:Label ID="lbl_password" runat="server" Text="Password:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_pass" TextMode="Password" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td colspan="2" align="center <br/><asp:Button ID="btn_submit" runat="server"
Text="Submit" style="color: #000080; font-weight: 700"
onclick="btn_submit_Click </asp:Button></td>
</tr>
</table>
<br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<br />
If you have difficulty accessing the system or cannot remember your username and password, please contact Logisource Support via email at mailto:support@company.com support@company.com .
<br /><br />
Unauthorized access to this system is strictly prohibited.
br />br />
<div > Contents Copyright © 2003 Company. All rights reserved.
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
[/code]
<br/>
and the codebehind
<pre class="prettyprint using System.Collections;
using System.Configuration;
using System.Data;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace index1
{
public partial class signup2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label3.Text = Request.UserHostAddress;
}
protected void btn_submit_Click(object sender, EventArgs e)
{
Response.Redirect("newAccount.aspx");
Session["Cust_Name"] = txt_username.Text;
}
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (string.Equals(RadioButtonList1.SelectedValue, "Client"))
{
Label1.Text = "Client Name:";
tbClient.Visible = true;
}
if (string.Equals(RadioButtonList1.SelectedValue, "Carrier"))
{
Label1.Text = "Carrier SCAC:";
tbClient.Visible = true;
}
}
}
}
[/code]
<br/>
View the full article
I know there is a better way to do this, but this is how it is to be done.
My code below for the signup.aspx
<pre class="prettyprint <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="signup.aspx.cs" Inherits="index1.signup2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
<html xmlns="http://www.w3.org/1999/xhtml
<head id="Head1" runat="server
<title>Audit Services Signup</title>
<script type="text/javascript" language="javascript
function yes() {
MMDiv.style.visibility = visible;
MMDiv2.style.visibility = visible;
txt_client.style.visibility = hidden;
lbl_client.style.visibility = hidden;
form1.CarrierScac.focus();
}
function no() {
MMDiv.style.visibility = hidden;
MMDiv2.style.visibility = hidden;
txt_client.style.visibility = hidden;
lbl_client.style.visibility = hidden;
}
function client() {
txt_client.style.visibility = visible;
lbl_client.style.visibility = visible;
MMDiv.style.visibility = hidden;
MMDiv2.style.visibility = hidden;
form1.clientname.focus();
}
</script>
<style type="text/css
.style1
{
font-size: small;
color: #000080;
}
.style2
{
color: #000080;
}
.style5
{
width: 156px;
}
.style6
{
color: #000080;
width: 137px;
}
.style7
{
width: 137px;
}
.style8
{
color:#FF0000;
width: 137px;
}
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td><img src="http://www.company.com/images/spacer.gif" height="1" width="20" alt="line" />A Division</td>
<!-- Display Date -->
<script type="text/javascript" language="JavaScript
<!-- Begin
d = new Array(
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
);
m = new Array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
);
today = new Date();
day = today.getDate();
year = today.getYear();
if (year < 2000)
year = year + 1900;
end = "th";
if (day == 1 || day == 21 || day == 31) end = "st";
if (day == 2 || day == 22) end = "nd";
if (day == 3 || day == 23) end = "rd";
day += end;
document.write("<font face=Verdana, Arial, Helvetica size=1>");
document.write(d[today.getDay()] + ", " + m[today.getMonth()] + " ");
document.write(day + ", " + year);
document.write("</font><img src=http://www.logisource.com/images/spacer.gif height=1 width=20>");
// End -->24.224.117.67
</script>
</tr>
<tr><td valign="top" colspan="2 <img src="http://www.company.com/images/line.gif" height="1" width="100%" alt = "line" /></td></tr>
</table>
<!-- ***************** Main Cell For Body ******************* -->
<table width="100%" border="0" >
<tr>
<td align="center <br />
<table width="100%" >
<tr>
<td align="center
<form id="form1" runat="server
<table border="0" cellpadding="0" cellspacing="1"
style="border-style: solid; border-color: #C0C0C0; border-width: 2px 20px 2px 20px; background-color: #EBEDEC;
<tr>
<td>
<table width="95%" >
<tr>
<td align="center
<table border="0" cellpadding="1" width="95%" >
<tr>
<td colspan="2" align="center <strong style="color: #000080 New User Account Setup <br /><br />
<span class="style1 *Your IP Address Is Being Tracked For Security Purposes<br
class="style1" /> </td>
</tr>
<tr>
<td align="right" class="style6 IP Address: </td>
<td class="style5
<asp:Label ID="Label3" runat="server" Text=" </asp:Label></td>
</tr>
<tr>
<td align="left" valign="middle" class="style6 Are you a Delta Audit: </td>
<td class="style5
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True"
Height="25px" Width="108px"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged"
RepeatDirection="Horizontal
<asp:ListItem Text="Client" Value="Client" Selected="False </asp:ListItem>
<asp:ListItem Text="Carrier" Value="Carrier" Selected="False </asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td class="style6" align="right
<asp:Label ID="Label1" runat="server" Text=" </asp:Label></td>
<td><asp:TextBox ID="tbClient" runat="server" Visible="false" ></asp:TextBox>
</td>
</tr>
<tr>
<td class="style6" align="right
<asp:Label ID="Label2" runat="server" Text=" </asp:Label></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_name" runat="server" Text="Name:" CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_name" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_company" runat="server" Text="Company Name:" CssClass="style2 </asp:Label></td>
<td class="style5
<asp:TextBox ID="txt_company" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_address" runat="server" Text="Address:" CssClass="style2 </asp:Label></td>
<td class="style5
<asp:TextBox ID="txt_address" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7 <asp:Label ID="lbl_city" runat="server" Text="City"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_city" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td align="right" class="style7
<asp:Label ID="lbl_state" runat="server" Text="State" CssClass="style2 </asp:Label></td>
<td class="style5
<aspropDownList ID="ddl_state" runat="server" CssClass="style2
<asp:ListItem Value=" </asp:ListItem>
<asp:ListItem Value="AL Alabama</asp:ListItem>
<asp:ListItem Value="AK Alaska</asp:ListItem>
<asp:ListItem Value="AZ Arizona</asp:ListItem>
<asp:ListItem Value="AR Arkansas</asp:ListItem>
<asp:ListItem Value="CA California</asp:ListItem>
<asp:ListItem Value="CO Colorado</asp:ListItem>
<asp:ListItem Value="CT Connecticut</asp:ListItem>
<asp:ListItem Value="DE Delaware</asp:ListItem>
<asp:ListItem Value="DC District of Columbia</asp:ListItem>
<asp:ListItem Value="FL Florida</asp:ListItem>
<asp:ListItem Value="GA Georgia</asp:ListItem>
<asp:ListItem Value="HI Hawaii</asp:ListItem>
<asp:ListItem Value="ID Idaho</asp:ListItem>
<asp:ListItem Value="IL Illinois</asp:ListItem>
<asp:ListItem Value="IN Indiana</asp:ListItem>
<asp:ListItem Value="IA Iowa</asp:ListItem>
<asp:ListItem Value="KS Kansas</asp:ListItem>
<asp:ListItem Value="KY Kentucky</asp:ListItem>
<asp:ListItem Value="LA Louisiana</asp:ListItem>
<asp:ListItem Value="ME Maine</asp:ListItem>
<asp:ListItem Value="MD Maryland </asp:ListItem>
<asp:ListItem Value="MA Massachusetts</asp:ListItem>
<asp:ListItem Value="MI </asp:ListItem>
<asp:ListItem Value="MN Minnesota</asp:ListItem>
<asp:ListItem Value="MS Mississippi</asp:ListItem>
<asp:ListItem Value="MO Missouri</asp:ListItem>
<asp:ListItem Value="MT Montana</asp:ListItem>
<asp:ListItem Value="NE Nebraska</asp:ListItem>
<asp:ListItem Value="NV Nevada</asp:ListItem>
<asp:ListItem Value="NH New Hampshire</asp:ListItem>
<asp:ListItem Value="NJ New Jersey</asp:ListItem>
<asp:ListItem Value="NM New Mexico</asp:ListItem>
<asp:ListItem Value="NY New York</asp:ListItem>
<asp:ListItem Value="NC North Carolina</asp:ListItem>
<asp:ListItem Value="ND North Dakota</asp:ListItem>
<asp:ListItem Value="OH Ohio</asp:ListItem>
<asp:ListItem Value="OK Oklahoma</asp:ListItem>
<asp:ListItem Value="OR Oregon</asp:ListItem>
<asp:ListItem Value="PA Pennsylvania</asp:ListItem>
<asp:ListItem Value="RI Rhode Island</asp:ListItem>
<asp:ListItem Value="SC South Carolina</asp:ListItem>
<asp:ListItem Value="SD South Dakota</asp:ListItem>
<asp:ListItem Value="TN Tennessee</asp:ListItem>
<asp:ListItem Value="TX Texas</asp:ListItem>
<asp:ListItem Value="UT Utah</asp:ListItem>
<asp:ListItem Value="VT Vermont</asp:ListItem>
<asp:ListItem Value="VA Virginia</asp:ListItem>
<asp:ListItem Value="WA Washington</asp:ListItem>
<asp:ListItem Value="WV West Virginia</asp:ListItem>
<asp:ListItem Value="WI Wisconsin</asp:ListItem>
<asp:ListItem Value="WY Wyoming</asp:ListItem>
</aspropDownList></td>
</tr>
<tr>
<td align="right" class="style7 <asp:Label ID="lbl_zipcode" runat="server" Text="Zip Code:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_zipcode" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td
align="right" class="style7 <asp:Label ID="lbl_phone" runat="server" Text="Phone Number:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_phone" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td
align="right" class="style7 <asp:Label ID="lbl_email" runat="server" Text="Email:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_email" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td colspan="2" align="center <br class="style2" /> <span class="style1 Please select a Username and Password. </td>
</tr>
<tr>
<td align="right" class="style7 <asp:Label ID="lbl_username" runat="server" Text="Username:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_username" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td
align="right" class="style7 <asp:Label ID="lbl_password" runat="server" Text="Password:"
CssClass="style2 </asp:Label></td>
<td class="style5 <asp:TextBox ID="txt_pass" TextMode="Password" runat="server" CssClass="style2 </asp:TextBox></td>
</tr>
<tr>
<td colspan="2" align="center <br/><asp:Button ID="btn_submit" runat="server"
Text="Submit" style="color: #000080; font-weight: 700"
onclick="btn_submit_Click </asp:Button></td>
</tr>
</table>
<br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<br />
If you have difficulty accessing the system or cannot remember your username and password, please contact Logisource Support via email at mailto:support@company.com support@company.com .
<br /><br />
Unauthorized access to this system is strictly prohibited.
br />br />
<div > Contents Copyright © 2003 Company. All rights reserved.
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
[/code]
<br/>
and the codebehind
<pre class="prettyprint using System.Collections;
using System.Configuration;
using System.Data;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace index1
{
public partial class signup2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label3.Text = Request.UserHostAddress;
}
protected void btn_submit_Click(object sender, EventArgs e)
{
Response.Redirect("newAccount.aspx");
Session["Cust_Name"] = txt_username.Text;
}
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (string.Equals(RadioButtonList1.SelectedValue, "Client"))
{
Label1.Text = "Client Name:";
tbClient.Visible = true;
}
if (string.Equals(RadioButtonList1.SelectedValue, "Carrier"))
{
Label1.Text = "Carrier SCAC:";
tbClient.Visible = true;
}
}
}
}
[/code]
<br/>
View the full article