i have a problem in redirecting my form to another.
this is my code for my first form.
<pre lang="vb">Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub cc_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cc.SelectedIndexChanged
End Sub
Protected Sub ok_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ok.Click
If cc.Text = "" Then
sign.Text = "Please Select Your Cost Center"
Else
sign.Text = ""
Response.Redirect("title.aspx")
End If
End Sub
End Class
<pre lang="xml"><%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div><div>
<center> Select <strong>Cost Center</strong> <strong> </strong>for your <strong>Training Plan</strong>.<br />
<br />
<br />
<br />
<br />
<br />
</center>
<center> <asp:Label ID="Label1" runat="server" Font-Bold="True" Height="16px" Text="Cost Center"
Width="88px"></asp:Label><br /></center>
<center><asp:DropDownList
ID="cc" runat="server" Height="40px" Width="192px">
<asp:ListItem></asp:ListItem>
<asp:ListItem>19629</asp:ListItem>
<asp:ListItem>12939</asp:ListItem>
<asp:ListItem>12941</asp:ListItem>
<asp:ListItem>13154</asp:ListItem>
<asp:ListItem>XXXXX</asp:ListItem>
<asp:ListItem>15029</asp:ListItem>
<asp:ListItem>16565</asp:ListItem>
<asp:ListItem>12940</asp:ListItem>
<asp:ListItem>12944</asp:ListItem>
<asp:ListItem>12940</asp:ListItem>
<asp:ListItem>12938</asp:ListItem>
<asp:ListItem>12934</asp:ListItem>
<asp:ListItem>12952</asp:ListItem>
<asp:ListItem>12950</asp:ListItem>
</asp:DropDownList>
<br /></center>
<br />
<br />
<br />
<center> <asp:Label ID="sign" runat="server" Width="264px"></asp:Label></center>
<br />
<br />
<center> <asp:Button ID="ok" runat="server" Font-Bold="True" Font-Names="Palatino Linotype"
Height="40px" Text="OK" Width="96px" /></center>
<center><asp:Button
ID="cancel" runat="server" Font-Bold="True" Font-Names="Palatino Linotype" Height="40px"
Text="Cancel" Width="96px" /><br /></center>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
</div>
</form>
</body>
</html>
my 2nd form.
<pre lang="vb">Partial Class title
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'If Session("name") = "" Then
'Response.Redirect("Default.aspx")
'Else
'title.Text = Session("name")
'End If
End Sub
Protected Sub ok1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ok1.Click
Dim a As String
a = "data.aspx"
If ct.Text = "" Then
sign.Text = "Please Select Your Course Title"
Else
sign.Text = ""
Response.Redirect(a)
End If
End Sub
Protected Sub cancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cancel.Click
'Response.Redirect("title.aspx")
End Sub
End Class
<pre lang="xml"><%@ Page Language="VB" AutoEventWireup="false" CodeFile="title.aspx.vb" Inherits="title" %>
<!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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<center>Please Select <strong>Course Title</strong> <strong>
</strong>for your <strong>Training Plan</strong>.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></center>
<center> <asp:Label ID="Label3" runat="server" Font-Bold="True" Height="16px" Text="Course Title"
Width="88px"></asp:Label><br /> </center>
<center><asp:DropDownList ID="ct" runat="server" Height="48px" Width="360px">
<asp:ListItem></asp:ListItem>
<asp:ListItem>GEE 51 Bulletin Requirements</asp:ListItem>
<asp:ListItem>Cross Functional Courses</asp:ListItem>
<asp:ListItem>Functional Courses (online)</asp:ListItem>
<asp:ListItem>Fluor University Functional Courses (instructor-led)</asp:ListItem>
<asp:ListItem>Local Functional Courses (instructor-led)</asp:ListItem>
<asp:ListItem>External Courses</asp:ListItem>
<asp:ListItem>Other Courses</asp:ListItem>
</asp:DropDownList><br /></center>
<br />
<br />
<center><asp:Label ID="sign" runat="server" BorderStyle="None" Width="264px"></asp:Label><br />
<br /></center>
<center><asp:Button ID="ok1" runat="server"
Font-Bold="True" Font-Names="Palatino Linotype" Height="40px" Text="OK" Width="96px" /></center>
<center> <asp:Button ID="cancel" runat="server" Font-Bold="True" Font-Names="Palatino Linotype"
Height="40px" Text="Cancel" Width="96px" />
</center></div>
</form>
</body>
</html>
here is my 3rd form.
<pre lang="vb">Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub cc_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cc.SelectedIndexChanged
End Sub
Protected Sub ok_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ok.Click
If cc.Text = "" Then
sign.Text = "Please Select Your Cost Center"
Else
sign.Text = ""
Response.Redirect("title.aspx")
End If
End Sub
End Class
<pre lang="xml"><%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div><div>
<center> Select <strong>Cost Center</strong> <strong> </strong>for your <strong>Training Plan</strong>.<br />
<br />
<br />
<br />
<br />
<br />
</center>
<center> <asp:Label ID="Label1" runat="server" Font-Bold="True" Height="16px" Text="Cost Center"
Width="88px"></asp:Label><br /></center>
<center><asp:DropDownList
ID="cc" runat="server" Height="40px" Width="192px">
<asp:ListItem></asp:ListItem>
<asp:ListItem>19629</asp:ListItem>
<asp:ListItem>12939</asp:ListItem>
<asp:ListItem>12941</asp:ListItem>
<asp:ListItem>13154</asp:ListItem>
<asp:ListItem>XXXXX</asp:ListItem>
<asp:ListItem>15029</asp:ListItem>
<asp:ListItem>16565</asp:ListItem>
<asp:ListItem>12940</asp:ListItem>
<asp:ListItem>12944</asp:ListItem>
<asp:ListItem>12940</asp:ListItem>
<asp:ListItem>12938</asp:ListItem>
<asp:ListItem>12934</asp:ListItem>
<asp:ListItem>12952</asp:ListItem>
<asp:ListItem>12950</asp:ListItem>
</asp:DropDownList>
<br /></center>
<br />
<br />
<br />
<center> <asp:Label ID="sign" runat="server" Width="264px"></asp:Label></center>
<br />
<br />
<center> <asp:Button ID="ok" runat="server" Font-Bold="True" Font-Names="Palatino Linotype"
Height="40px" Text="OK" Width="96px" /></center>
<center><asp:Button
ID="cancel" runat="server" Font-Bold="True" Font-Names="Palatino Linotype" Height="40px"
Text="Cancel" Width="96px" /><br /></center>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
</div>
</form>
</body>
</html>
my problem is.. when i go to my 2nd form. when i click ok. it will go back to my 1st form.
im still a noobie in coding.
im hoping you can help me.
thank you.