Hi indradeo,
Please refer below sample.
HTML
Default
<table>
<tr>
<td>Number:<asp:TextBox ID="txtNumber" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Country:<asp:TextBox ID="txtCountry" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>City:<asp:TextBox ID="txtCity" runat="server"></asp:TextBox></td>
</tr>
</table>
<asp:Label ID="lblMessage" runat="server"></asp:Label>
<table>
<tr>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" BorderColor="Transparent" BorderStyle="None" CssClass="auto-style14" Height="28px" Width="130px">
<asp:ListItem Value="Services">Services</asp:ListItem>
<asp:ListItem Value="Purches">Purches</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="lblNumber" runat="server"></asp:Label>
<asp:Label ID="lblMessege" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td><asp:Button ID="btnSend" runat="server" Text="Send" OnClick="Send" /></td>
</tr>
</table>
Home
<asp:Label ID="lblNumber" runat="server"></asp:Label>
Code
C#
Default
protected void Send(object sender, EventArgs e)
{
int number = int.Parse(txtNumber.Text);
if (number > 40000000 && number <= 150000000)
{
lblMessage.Text = "Services";
Session["Pkgnm"] = txtNumber.Text;
Session["estcst"] = txtCountry.Text;
Session["comprd"] = txtCity.Text;
Session["Message"] = "Services";
Response.Redirect("Home.aspx");
}
else if (number > 150000000)
{
lblMessage.Text = "Purches";
Session["Pkgnm"] = txtNumber.Text;
Session["estcst"] = txtCountry.Text;
Session["comprd"] = txtCity.Text;
Session["Message"] = "Purches";
Response.Redirect("Home.aspx");
}
else
{
Session["Pkgnm"] = txtNumber.Text;
Session["estcst"] = txtCountry.Text;
Session["comprd"] = txtCity.Text;
Session["Whether"] = DropDownList1.SelectedItem.Text;
Response.Redirect("Default.aspx");
}
}
Home
protected void Page_Load(object sender, EventArgs e)
{
lblNumber.Text = Session["Message"].ToString();
}
VB.Net
Default
Protected Sub Send(ByVal sender As Object, ByVal e As EventArgs)
Dim number As Integer = Integer.Parse(txtNumber.Text)
If number > 40000000 AndAlso number <= 150000000 Then
lblMessage.Text = "Services"
Session("Pkgnm") = txtNumber.Text
Session("estcst") = txtCountry.Text
Session("comprd") = txtCity.Text
Session("Message") = "Services"
Response.Redirect("Home.aspx")
ElseIf number > 150000000 Then
lblMessage.Text = "Purches"
Session("Pkgnm") = txtNumber.Text
Session("estcst") = txtCountry.Text
Session("comprd") = txtCity.Text
Session("Message") = "Purches"
Response.Redirect("Home.aspx")
Else
Session("Pkgnm") = txtNumber.Text
Session("estcst") = txtCountry.Text
Session("comprd") = txtCity.Text
Session("Whether") = DropDownList1.SelectedItem.Text
Response.Redirect("Default.aspx")
End If
End Sub
Home
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
lblNumber.Text = Session("Message").ToString()
End Sub
Screenshot