large text field

  • Thread starter Thread starter Andy G
  • Start date Start date
A

Andy G

I have a very general question and just need someone to lead me in the right
direction. I am constructing a ASP.NET web form that is called
'Acknowledgement'. My client needs people to read and accept a privacy
disclosure statement before they register for the applications main
offerings. I was hoping someone could lead me in the right directions in
where to start for this. Here are a few questions that possibly need to be
answered; Do I use a text box or a lable? Can I reference a .txt file from
the server so that the text area will fill in automatically with the text
from the file? (that's what I would really like to do) Should I reference a
field from my backend database? How do I link these things? Just a pointer
in where to look or start would be great!

Thanks
Andy
 
Hi Andy,

There are a number of ways that you could do this. You could use an HTML
iframe tag and just reference the privacy agreement as an HTML file.

If you want to insert the text, you could use a textbox like this:

<P>Read this and agree to sign your life away:</P>
<P>
<asp:TextBox id="TextBox1" runat="server" Width="512px" Height="264px"
TextMode="MultiLine"></asp:TextBox></P>
<P>
<asp:CheckBox id="CheckBox1" runat="server" Text="I agree!!!"
AutoPostBack="True"></asp:CheckBox></P>

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
If Not IsPostBack Then
Dim fw As New System.IO.StreamReader _
(Server.MapPath("eula.txt"), True)
TextBox1.Text = fw.ReadToEnd()
End If
End Sub

Does this help?

Ken
Microsoft MVP [ASP.NET]
 
Thank you so much Ken! It is so simple but I couldn't think of anything.
Thanks again.


Ken Cox said:
Hi Andy,

There are a number of ways that you could do this. You could use an HTML
iframe tag and just reference the privacy agreement as an HTML file.

If you want to insert the text, you could use a textbox like this:

<P>Read this and agree to sign your life away:</P>
<P>
<asp:TextBox id="TextBox1" runat="server" Width="512px" Height="264px"
TextMode="MultiLine"></asp:TextBox></P>
<P>
<asp:CheckBox id="CheckBox1" runat="server" Text="I agree!!!"
AutoPostBack="True"></asp:CheckBox></P>

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
If Not IsPostBack Then
Dim fw As New System.IO.StreamReader _
(Server.MapPath("eula.txt"), True)
TextBox1.Text = fw.ReadToEnd()
End If
End Sub

Does this help?

Ken
Microsoft MVP [ASP.NET]


Andy G said:
I have a very general question and just need someone to lead me in the
right
direction. I am constructing a ASP.NET web form that is called
'Acknowledgement'. My client needs people to read and accept a privacy
disclosure statement before they register for the applications main
offerings. I was hoping someone could lead me in the right directions in
where to start for this. Here are a few questions that possibly need to
be
answered; Do I use a text box or a lable? Can I reference a .txt file
from
the server so that the text area will fill in automatically with the text
from the file? (that's what I would really like to do) Should I reference
a
field from my backend database? How do I link these things? Just a
pointer
in where to look or start would be great!

Thanks
Andy
 
Back
Top