TextBox1.Text.Replace(Environment.NewLine,"<br/>");
Dim result As String
result = TextBox1.Text.Replace(Environment.NewLine, "<br/>")
Deafult.aspx
-----------------
<%@ 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 id="PageHead" runat="server">
<script runat="server">
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Human Resourses </title>
<link href="Default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.invertedshiftdown2{
padding: 0;
width: 78%;
border-top: 5px solid #000099; /*Highlight blue color theme*/
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
}
.invertedshiftdown2 ul{
margin:0;
margin-left: 40px; /*margin between first menu item and left browser edge*/
padding: 0;
list-style: none;
}
.invertedshiftdown2 li{
display: inline;
margin: 0 2px 0 0;
padding: 0;
text-transform:uppercase;
}
.invertedshiftdown2 a{
float: left;
display: block;
font: bold 12px Arial;
color: black;
text-decoration: none;
margin: 0 1px 0 0; /*Margin between each menu item*/
padding: 5px 10px 5px 10px; /*Padding within each menu item*/
background-color: lightblue; /*Default menu color*/
border-bottom: 8px solid white;
}
.invertedshiftdown2 a:hover{
background-color: #000099; /*Highlight red color theme*/
padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
padding-bottom: 0; /*Set padding-bottom value to 0 */
border-bottom-color: #000099; /*Highlight red color theme*/
color: white;
}
.invertedshiftdown2 .current a{ /** currently selected menu item **/
background-color: #D10000; /*Highlight red color theme*/
padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
padding-bottom: 0; /*Set padding-bottom value to 0 */
border-bottom-color: #D10000; /*Highlight red color theme*/
color: white;
}
#myform{ /*CSS for sample search box. Remove if desired */
float: right;
margin: 0;
margin-top: 2px;
padding: 0;
}
#myform .textinput{
width: 190px;
border: 1px solid gray;
}
#myform .submit{
font: normal 12px Verdana;
height: 22px;
border: 1px solid #000099;
background-color: black;
color: white;
}
</style>
<script language="javascript" type="text/javascript">
</script>
</head>
<body style="background-color: white; text-align: center;">
<form id="FormMain" runat="server">
<table width="770px" border="0" cellspacing="0" cellpadding="0">
<tr class="StandardPageHeader">
<td width="1" bgcolor="#FFFFFF" align="left">
<a href="http://www.tamu-commerce.edu"><img src="BlockLogo.jpg" alt="Passionate About Learning? You Belong Here." border="0" style="height: 112px"/></a>
</td>
<td align="center">
<img src="StudentsAtComputer.jpg" style="width: 568px; height: 114px" />
</td>
</tr>
</table>
<br style="clear: both;" />
<table width="770px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="height: 16px; text-align: center; width: 770px;">
<table style="width: 615px; height: 123px">
<tr>
<td style="width: 294px; height: 149px; text-align: center">
<asp:Label ID="Label1" runat="server" Height="79px" Text=" You can register for as many courses as you would like by checking the box next to the course title. When you have made your selection(s), please click the link at the bottom of the window to proceed to the registration page."
Width="479px"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server" Text="Also Computer Training Workshops are available through Instructional Technology"
Width="473px"></asp:Label><br />
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://www.tamu-commerce.edu/itde/training_workshops/class_descriptions.asp?pageName=training&menuName=training"
Target="_self" Width="438px">Computer Training Workshops </asp:HyperLink></td>
<td style="width: 125px; height: 149px">
<img src="color_checklist.gif" /></td>
</tr>
</table>
<asp:PlaceHolder ID="PageBody" runat="server" />
<br />
</td>
</tr>
</table>
<br />
<asp:Button ID="Button1" runat="server"
Text="Submit" />
<br />
<br />
<asp:Label ID="Footer" runat="server" BackColor="#0000C0" CssClass="StandardPageHeader" Width="773px" >.</asp:Label>
</form>
</body>
</html>
--------------
Default.aspx.vb // note this is just the part that i think you need
--------------
Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Session.Add("course", temparray)
Dim CNAME As String
Dim PNAME As String
Dim DATE1 As String
Dim TIME As String
Dim LOC As String
Dim REMSEAT As String
Dim CDESC As String
Call localDBConnectionOpen()
sqlstmt = "SELECT * FROM CHRTR"
rs = DBRecordSetNewFast(ConnPortal, sqlstmt)
l = New Label
l.Text = " <br />"
PageBody.Controls.Add(l)
l = New Label
l.Text = " Human Resourses Course Registration"
PageBody.Controls.Add(l)
l = New Label
l.Text = " <br />"
PageBody.Controls.Add(l)
' loop the table and print a header for each database entry
t = New Table
t.Width = Unit.Percentage(100)
While Not rs.EOF
' creates the table for the diplay
r = New TableRow
r.VerticalAlign = VerticalAlign.Top
r.CssClass = "StandardRowHeader"
c = New TableHeaderCell
c.Text = "Course "
r.Controls.Add(c)
c = New TableCell
c.Text = "Presenter"
r.Controls.Add(c)
c = New TableHeaderCell
c.Text = "Date"
r.Controls.Add(c)
c = New TableHeaderCell
c.Text = "Time"
r.Controls.Add(c)
c = New TableHeaderCell
c.Text = "Location"
r.Controls.Add(c)
c = New TableHeaderCell
c.Text = "Seats"
r.Controls.Add(c)
c = New TableHeaderCell
c.Text = "Course Description"
r.Controls.Add(c)
c = New TableHeaderCell
r.Controls.Add(c)
t.Controls.Add(r)
CNAME = DBGetField(rs, "CNAME")
PNAME = DBGetField(rs, "PNAME")
DATE1 = DBGetField(rs, "DATE")
TIME = DBGetField(rs, "TIME")
LOC = DBGetField(rs, "LOC")
REMSEAT = DBGetField(rs, "REMSEAT")
CDESC = DBGetField(rs, "CDESC")
ID = DBGetField(rs, "ID")
r = New TableRow
ct += 1
If ct Mod 2 = 0 Then
r.CssClass = "StandardRowEven"
Else
r.CssClass = "StandardRowOdd"
End If
' call to the varabkes that hold the data from the database
Call CellAdd(r, CNAME.ToString)
Call CellAdd(r, PNAME.ToString)
Call CellAdd(r, DATE1.ToString)
Call CellAdd(r, TIME.ToString)
Call CellAdd(r, LOC.ToString)
Call CellAdd(r, REMSEAT.ToString)
Call CellAdd(r, CDESC.ToString)
Call CellAdd(r, "<center><a href=""register.aspx" & ID & """></a></center>")
check = New CheckBox
check.ID = ID ' makes the id the name of the checkbox
c.Controls.Add(check)
Call savedata()
t.Controls.Add(r)
rs.MoveNext()
End While
PageBody.Controls.Add(t)
rs = DBRecordSetDestroy(rs)
Call localDBConnectionClose()
End Sub
addcourse.aspx
---------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="addCourse.aspx.vb" Inherits="admin_addCourse" %>
<!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="PageHead" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Human Resourses </title>
<link href="Default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.invertedshiftdown2{
padding: 0;
width: 770px;
border-top: 5px solid #000099; /*Highlight blue color theme*/
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
}
.invertedshiftdown2 ul{
margin:0;
margin-left: 40px; /*margin between first menu item and left browser edge*/
padding: 0;
list-style: none;
}
.invertedshiftdown2 li{
display: inline;
margin: 0 2px 0 0;
padding: 0;
text-transform:uppercase;
}
.invertedshiftdown2 a{
float: left;
display: block;
font: bold 12px Arial;
color: black;
text-decoration: none;
margin: 0 1px 0 0; /*Margin between each menu item*/
padding: 5px 10px 5px 10px; /*Padding within each menu item*/
background-color: lightblue; /*Default menu color*/
border-bottom: 8px solid white;
}
.invertedshiftdown2 a:hover{
background-color: #000099; /*Highlight red color theme*/
padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
padding-bottom: 0; /*Set padding-bottom value to 0 */
border-bottom-color: #000099; /*Highlight red color theme*/
color: white;
}
.invertedshiftdown2 .current a{ /** currently selected menu item **/
background-color: #D10000; /*Highlight red color theme*/
padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
padding-bottom: 0; /*Set padding-bottom value to 0 */
border-bottom-color: #D10000; /*Highlight red color theme*/
color: white;
}
</style>
</head>
<body style="background-color: white">
<center>
<table width="770px" border="0" cellspacing="0" cellpadding="0">
<tr class="StandardPageHeader">
<td width="1" bgcolor="#FFFFFF" align="left" style="height: 117px">
<a href="http://www.tamu-commerce.edu"><img src="BlockLogo.jpg" alt="Passionate About Learning? You Belong Here." border="0" style="height: 112px"/></a>
</td>
<td align="left" style="height: 117px">
<img src="StudentsAtComputer.jpg" style="width: 561px; height: 114px" /> </td>
</tr>
</table>
<div class="invertedshiftdown2" style="height: 36px; text-align: center;">
<ul>
<li style="text-align: center"><a href="default.aspx" title="Home">Home</a></li>
<li style="text-align: center"><a href="addCourse.aspx" title="New">Add Course</a></li>
<li style="text-align: center"><a href="viewreport.aspx" title="Tools">Reports</a></li>
<li style="text-align: center"><a href="remove.aspx" title="Help">Remove </a></li>
<li style="text-align: center"><a href="adduser.aspx" title="Help">Add User </a></li>
</ul>
<br style="clear: both;" />
<table width="770px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="text-align: center; height: 367px;">
Hr Tranning info
<br />
<asp:Label ID="IDERR" runat="server" ForeColor="Red"></asp:Label><p style="text-align: center">
<form id="Form1" runat="server">
<table style="width: 279px">
<tr>
<td style="width: 158px">
<asp:Label ID="course" runat="server" Text="Course ID: " Width="140px" Visible="False"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox ID="CID" runat="server" Width="224px" Enabled="False" Visible="False"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="coursen" runat="server" Text="Course Name: " Width="116px"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox
ID="CNAME" runat="server" Width="224px"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="PNAME1" runat="server" Text="Presenters Name: " Width="140px"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox
ID="PNAME" runat="server" Width="224px"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="loc" runat="server" Text="Location: " Width="131px"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Font-Size="X-Small" Text="EX: BA 143"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox
ID="LOCA1" runat="server" Width="224px" Wrap="False"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="time123" runat="server" Text=" Time: " Width="139px"></asp:Label><br />
<asp:Label ID="Label1" runat="server" Font-Size="X-Small" Text="Ex: May,12,2010"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox
ID="TIME" runat="server" Width="224px"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="date123" runat="server" Text="Date: " Width="136px" Height="16px"></asp:Label><br />
<asp:Label ID="Label2" runat="server" Font-Size="X-Small" Text="Ex: 12:00 pm - 1:00 pm"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox
ID="Date111" runat="server" Width="224px"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="REMS1" runat="server" Text="Available Seats " Width="128px"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox
ID="REMS" runat="server" Width="26px" MaxLength="3"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 158px">
<asp:Label ID="cordsc" runat="server" Text="Course description: " Width="161px" Height="55px"></asp:Label></td>
<td style="width: 201px">
<asp:TextBox
ID="CORD" runat="server" Height="63px" Width="224px" Rows="20" TextMode="MultiLine" MaxLength="20"></asp:TextBox></td>
</tr>
</table>
</p>
<p style="text-align: center">
<br />
<asp:Button ID="submit" runat="server" OnClick="submit_click" Text="Register" />
</form>
</td>
</tr>
</table>
<asp:Label cssclass="StandardPageHeader" runat="server" ID="Footer" Width="768px" BackColor="#0000C0"></asp:label>
</body>
</html>
addcourse.aspx.vb
-----------------
Protected Sub submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit.Click
Dim l As Label ' lable that shows the user thatrs loged in
Dim rs As ADODB.Recordset ' recorde set for the connection
Dim sqlstmt As String
Dim ct As Integer = 0
Call localDBConnectionOpen()
' check to see if there are any null values
If CID.Text = "0" Then
IDERR.Text = " Please enter a Course ID "
Exit Sub
End If
If CNAME.Text = "" Then
IDERR.Text = " Please enter a Course name"
Exit Sub
End If
If PNAME.Text = "" Then
IDERR.Text = " Please enter a Presenter Name"
Exit Sub
End If
If Date111.Text = "" Then
IDERR.Text = " Please enter a Date"
Exit Sub
End If
If TIME.Text = "" Then
IDERR.Text = " Please enter a time"
Exit Sub
End If
If loc.Text = "" Then
IDERR.Text = " Please enter a Location"
Exit Sub
End If
If REMS.Text = "" Then
IDERR.Text = " Please enter a Seats"
Exit Sub
End If
If CORD.Text = "" Then
IDERR.Text = " Please enter a Course Infomation"
Exit Sub
End If
CORD.Text.Replace(Environment.NewLine, "<br/>")
' sql statement that doe sthe insert
sqlstmt = "Insert into CHRTR (CNAME,PNAME,DATE,TIME,LOC,REMSEAT,CDESC) values ('" & CNAME.Text & "','" & PNAME.Text & "','" & Date111.Text & "','" & TIME.Text & "','" & LOCA1.Text & "','" & REMS.Text & "','" & CORD.Text & "')"
rs = DBRecordSetNewFast(ConnPortal, sqlstmt)
Response.Redirect("Default.aspx")
rs = DBRecordSetDestroy(rs)
Call localDBConnectionClose()
End Sub
<!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="PageHead"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>
Human Resourses
</title><link href="Default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.invertedshiftdown2{
padding: 0;
width: 78%;
border-top: 5px solid #000099; /*Highlight blue color theme*/
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
}
.invertedshiftdown2 ul{
margin:0;
margin-left: 40px; /*margin between first menu item and left browser edge*/
padding: 0;
list-style: none;
}
.invertedshiftdown2 li{
display: inline;
margin: 0 2px 0 0;
padding: 0;
text-transform:uppercase;
}
.invertedshiftdown2 a{
float: left;
display: block;
font: bold 12px Arial;
color: black;
text-decoration: none;
margin: 0 1px 0 0; /*Margin between each menu item*/
padding: 5px 10px 5px 10px; /*Padding within each menu item*/
background-color: lightblue; /*Default menu color*/
border-bottom: 8px solid white;
}
.invertedshiftdown2 a:hover{
background-color: #000099; /*Highlight red color theme*/
padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
padding-bottom: 0; /*Set padding-bottom value to 0 */
border-bottom-color: #000099; /*Highlight red color theme*/
color: white;
}
.invertedshiftdown2 .current a{ /** currently selected menu item **/
background-color: #D10000; /*Highlight red color theme*/
padding-top: 10px; /*Set padding-top value to default's padding-top + padding-bottom */
padding-bottom: 0; /*Set padding-bottom value to 0 */
border-bottom-color: #D10000; /*Highlight red color theme*/
color: white;
}
#myform{ /*CSS for sample search box. Remove if desired */
float: right;
margin: 0;
margin-top: 2px;
padding: 0;
}
#myform .textinput{
width: 190px;
border: 1px solid gray;
}
#myform .submit{
font: normal 12px Verdana;
height: 22px;
border: 1px solid #000099;
background-color: black;
color: white;
}
</style>
<script language="javascript" type="text/javascript">
</script>
</head>
<body style="background-color: white; text-align: center;">
<form name="FormMain" method="post" action="Default.aspx" id="FormMain">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTcyOTYwMjY4N2QYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgIFAzU1MAUDNTUxXlEbRIxbFT8C+aCHhI20mRRlw8o=" />
</div>
<table width="770px" border="0" cellspacing="0" cellpadding="0">
<tr class="StandardPageHeader">
<td width="1" bgcolor="#FFFFFF" align="left">
<a href="http://www.tamu-commerce.edu"><img src="BlockLogo.jpg" alt="Passionate About Learning? You Belong Here." border="0" style="height: 112px"/></a>
</td>
<td align="center">
<img src="StudentsAtComputer.jpg" style="width: 568px; height: 114px" />
</td>
</tr>
</table>
<br style="clear: both;" />
<table width="770px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="height: 16px; text-align: center; width: 770px;">
<table style="width: 615px; height: 123px">
<tr>
<td style="width: 294px; height: 149px; text-align: center">
<span id="Label1" style="display:inline-block;height:79px;width:479px;"> You can register for as many courses as you would like by checking the box next to the course title. When you have made your selection(s), please click the link at the bottom of the window to proceed to the registration page.</span>
<span id="Label2" style="display:inline-block;width:473px;">Also Computer Training Workshops are available through Instructional Technology</span></td>
<td style="width: 125px; height: 149px">
<img src="color_checklist.gif" />
<span id="back" style="color:Red;"></span></td>
</tr>
</table>
<a id="HyperLink1" href="http://www.tamu-commerce.edu/itde/training_workshops/class_descriptions.asp?pageName=training&menuName=training" target="_self" style="display:inline-block;width:338px;">Computer Training Workshops </a>
<br />
<span> <br /></span><span> Human Resourses Course Registration</span><span> <br /></span><table border="0" style="width:100%;">
<tr class="StandardRowHeader" valign="top">
<th>Course </th><td>Presenter</td><th>Date</th><th>Time</th><th>Location</th><th>Seats</th><th>Course Description</th><th><input id="550" type="checkbox" name="550" /></th>
</tr><tr class="StandardRowOdd">
<td>New Employee Orientation</td><td>Shawntay Carrier</td><td>August 11, 2008</td><td>8:30 am to 4:00 pm</td><td>EdSouth 101</td><td>18</td><td>We have developed this program to help you and your fellow new team members feel more comfortable in your new environment. This program has been designed to be enlightening, enriching, and entertaining. During this fast-paced, high-energy session, you will have several opportunities to
become more knowledgeable about our University and its rich history
meet new colleagues and team members
be introduced to key people within our organization
identify where to go for information or answers to questions
gain information about key areas of the University
identify tangible and intangible benefits of working here
develop a sense of being a part of a team
have fun!
</td><td><center><a href="register.aspx550"></a></center></td>
</tr><tr class="StandardRowHeader" valign="top">
<th>Course </th><td>Presenter</td><th>Date</th><th>Time</th><th>Location</th><th>Seats</th><th>Course Description</th><th><input id="551" type="checkbox" name="551" /></th>
</tr><tr class="StandardRowEven">
<td>Intro to C++</td><td>Chris Jones</td><td>12:00pm - 1:00pm</td><td>July 12,2008</td><td>BA 132</td><td>1</td><td>This is a course that will help you with some c++ issues.
and its just a test
and its just a test
and its just a test
and its just a test </td><td><center><a href="register.aspx551"></a></center></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<input type="submit" name="Button1" value="Submit" id="Button1" />
<br />
<br />
<span id="Footer" class="StandardPageHeader" style="display:inline-block;background-color:#0000C0;width:773px;">.</span>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBAKy0bv0DQKlrvm5CwLAl5fPBQKM54rGBr/Z7DcWtJ8UJrvZXKeU3TEcDN6y" />
</div></form>
</body>
</html>
Private Sub CellAdd(ByRef r As TableRow, ByVal t As String)
Dim c = New TableCell
c.text = t
r.Controls.Add(c)
c = Nothing
End Sub
Dim result As String
result = CORD.Text.Replace(Environment.NewLine, "
")
' sql statement that doe sthe insert
sqlstmt = "Insert into CHRTR (CNAME,PNAME,DATE,TIME,LOC,REMSEAT,CDESC) values ('" & CNAME.Text & "','" & PNAME.Text & "','" & Date111.Text & "','" & TIME.Text & "','" & LOCA1.Text & "','" & REMS.Text & "','" & result & "')"