473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Not able to retrieve the values of text box

I have a form with Repeater . The repeater has Radio buttons, textareas, Check box. How do I get the values of the text area when the form is submitted to be saved to the database. I was able to get the values of other controls and not the values of textarea. Any help would be appreciated.

Expand|Select|Wrap|Line Numbers
  1.  
  2. ltrDisplayText = CType(e.Item.FindControl("ltrDisplayText"), System.Web.UI.WebControls.Literal)
  3.  
  4.   If Trim(Right(strDisplay, 4)) = Trim("TEXT") Then
  5.        ltrDisplayText.Text = "<TEXTAREA id='" & ltrDisplayText.ClientID & "' rows='5' cols='50'" & " name=" & drvData.Item("QuestionID").ToString.Trim & "'></TEXTAREA>"
  6.   Else
  7.        ltrDisplayText.Text = ""
  8.   End If
]
Jul 13 '07 #1
1 1354
nateraaaa
663 Expert 512MB
I have a form with Repeater . The repeater has Radio buttons, textareas, Check box. How do I get the values of the text area when the form is submitted to be saved to the database. I was able to get the values of other controls and not the values of textarea. Any help would be appreciated.

Expand|Select|Wrap|Line Numbers
  1.  
  2. ltrDisplayText = CType(e.Item.FindControl("ltrDisplayText"), System.Web.UI.WebControls.Literal)
  3.  
  4.   If Trim(Right(strDisplay, 4)) = Trim("TEXT") Then
  5.        ltrDisplayText.Text = "<TEXTAREA id='" & ltrDisplayText.ClientID & "' rows='5' cols='50'" & " name=" & drvData.Item("QuestionID").ToString.Trim & "'></TEXTAREA>"
  6.   Else
  7.        ltrDisplayText.Text = ""
  8.   End If
]
You will need to create a new textbox and assign its value to the textbox in the repeater using the FindControl method

Expand|Select|Wrap|Line Numbers
  1. Dim txt As TextBox = CType(e.Item.FindControl("ltrDisplayText)"),TextBox)
  2. Dim EnteredText As String = txt.Text
Use EnteredText as the parameter that you pass to your stored procedure or query.

Nathan
Jul 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jeff Johnson [MVP: VB] | last post by:
Is there any way to retrieve the name of a capture group from the classes provided in the RegularExpressions namespace? GroupCollection implements ICollection and IEnumerable, not IDictionary, so...
0
by: Xiru | last post by:
I would like to retrieve the value from a DataList on postback. I can read the ItemIndex and values from a child TextBox but not cannot seem to find a way to read a databound item on the datalist....
2
by: Uncle_Albert | last post by:
Hi peeps, Here's a screenshot of a particular form in my program. http://www.jdr.dsl.pipex.com/dg1.JPG Basically, when I click on 'Refresh Totals', I want it to retrieve all values from the...
1
by: j.t.w | last post by:
Hi. I'm new to ASP.Net and I'm running into a simple problem (I think). I'm trying to get 2 values from 2 separate queries into 2 different variables. I would then like to take the difference...
11
by: Patricio | last post by:
Hello all I open a PopUp that receives two variables (values). This PopUp must return a value as well. How can I retrieve this value? Thanks a lot.
3
by: bazubwabo | last post by:
hi everybody , could u please help me to find out the error on my asp codes,i can't retrieve the inserted values. Here is below the code: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE...
9
by: Mel | last post by:
I have 10 columns total. 3 of them are invisible. The rest are read- only BoundFields, 3 of which are editable fields using TemplateFields. Upon editing, I want to validate what the user enters...
4
chumlyumly
by: chumlyumly | last post by:
Hi - I'm working with PHP5 MySQL Mac OSX I've developed two pages where a user can input his/her info, which goes to a MySQL database. The first page is supposed to pass the newly created...
2
by: chirag1989 | last post by:
i have created an arry of text box now i want to retrieve the values of each text box so as to insert them in data base can anyone help how can i retrieve the values of array of textbox and store...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.