We help IT Professionals succeed at work.

formatting a textbox in asp.net

Chris Jones
Chris Jones asked
on
809 Views
Last Modified: 2012-05-05
i have a input form on my aspx form and i need to know of a way to have it formated as it goies into the dayabase with carage returns after each sentance
Comment
Watch Question

Commented:
What's your plan to identify each sentance?
Hi,

I presume you are using textbox control in the ASPX form. Just set it a SingleLIne property, and the number of rows of the textbox to 1. Try it out.
IF you are already doing this, please let me know in detail about your scenario... post your code.

Regards,
Kalpana
Chris JonesLead Application Web Developer

Author

Commented:
ok there is not much cod just a textbox and a user will enter some infomation

EXAMPLE
--------------------
things to do .
code the next project.
read a book.
go to the store.
eat more chicken

most of the infomation needs to end with a carage return characterso when the page displays it in a datagrid its formatted correctly with carage returns
Hi,

If you want the carriage returns to persist, then set the property TextMode as Multiline, and set the number of display rows to 10 (it will give the user a big text area sometihng like the COmment entry box in this page), Carriage returns can be persisted this way.

Regards,
Kalpana

Commented:
I think I get what you are asking.

Try this, before saving to database or after retrieving from database but before displaying on the page, replace the return with
Something like,

TextBox1.Text.Replace(Environment.NewLine,"");

Commented:

TextBox1.Text.Replace(Environment.NewLine,"<br/>");

Open in new window

Chris JonesLead Application Web Developer

Author

Commented:
how do i put this in the txtbox and when
hi Blinge...

Put this line just before you send textbox1.text to the database.

Regards,
Kalpana
Chris JonesLead Application Web Developer

Author

Commented:
can you show me the coee in vb.net i am not good is c# it may work for both i will try
Chris JonesLead Application Web Developer

Author

Commented:
thit line of code did not work

Commented:
Try save the result to database
Dim result As String
result = TextBox1.Text.Replace(Environment.NewLine, "<br/>")

Open in new window

Chris JonesLead Application Web Developer

Author

Commented:
ok this did not work it still shows the sentances un formatted

Commented:
Where it shows the sentances unformatted? On an aspx page or database?
Chris JonesLead Application Web Developer

Author

Commented:
on the aspx page

Commented:
Would you please post your aspx page code? Both code behind and the page itself.
Chris JonesLead Application Web Developer

Author

Commented:
ok

the asp page is the page that i need the data to be formated in,its the course desc field
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" />&nbsp;
	  </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 />
    &nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<asp:Button ID="Button1" runat="server"
        Text="Submit" />&nbsp;&nbsp;&nbsp;
    <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 = "&nbsp;<br />"
        PageBody.Controls.Add(l)
        l = New Label
        l.Text = " Human Resourses Course Registration"
        PageBody.Controls.Add(l)
        l = New Label
        l.Text = "&nbsp;<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" />&nbsp;</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 &nbsp;&nbsp;
          <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>
                              &nbsp; &nbsp;&nbsp;</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

Open in new window

Commented:
Where is your CellAdd function?

open source file from the browser to check whether the CDESC column has value
<br/>
instead of
&amp;lt;br/&amp;gt;

Commented:
<br/>
should be
< br/ >

Commented:
&amp;lt;br/&amp;gt;
should be
<br/>
Chris JonesLead Application Web Developer

Author

Commented:
hetre is what my source looks like

 
<!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" />&nbsp;
	  </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">
                      &nbsp;<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&amp;menuName=training" target="_self" style="display:inline-block;width:338px;">Computer Training Workshops </a>&nbsp;
          <br />
         <span>&nbsp;<br /></span><span> Human Resourses Course Registration</span><span>&nbsp;<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 />
    &nbsp;
    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<input type="submit" name="Button1" value="Submit" id="Button1" />&nbsp;&nbsp;&nbsp;
    <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>

Open in new window

Chris JonesLead Application Web Developer

Author

Commented:
Cell add function
    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

Open in new window

Commented:
You did not save the < br/ >  to database

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 & "','" & CORD.Text & "')"

Should be
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  & "')"

Commented:

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  & "')" 

Open in new window

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Chris JonesLead Application Web Developer

Author

Commented:
ok this works is there any way i gan get just this field aligned so it looks like its all a diffrent sentance.i am not sure if this is another queston or not
Chris JonesLead Application Web Developer

Author

Commented:
great answre this works

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.