Repeater control is returning blank textbox

G

Guest

Hi,

I just converted my asp.net app to vs2005 and now developing using vista and
run into a problem using the repeater control.

I bind the repeater control using

If Not IsPostBack Then
strError = myInvoice.GetOpenInvoices()
If strError <> "" Then
lblError.Text = strError
lblError.Visible = True
Return
End If
rptrInvoices.DataSource = myInvoice.myOpenInvoices.MyDataSet
rptrInvoices.DataBind()
Next

when I use

Dim oItem As RepeaterItem
For Each oItem In rptrInvoices.Items
Dim SSS, rrr
Dim eee As TextBox
eee = oItem.FindControl("txtPayAmountCol")
rrr = eee.Text.ToString().Trim()
End For

the rrr value is always empty on the postback. I made sure that the bind was
not happening also on the postback
I further checked that value is in the text box by using:

Dim htmlItem, htmlvalue As String
For nI = 1 To (Request.Form.Count() - 1)
htmlItem = Request.Form.GetKey(nI)
htmlvalue = Request.Form.Item(nI)
nEXT
and check each value and the value is there. For example 111.11 as entered.
Can anyone help me?
 
G

Guest

Ok, after some investigation I found that a textbox in a repeater control
that has been initially set as either "ReadOnly=True" or "Enabled=False" in
the form than the VB code behind always seems to return spaces. As my textbox
was a hidden field it was no problem for me to change this. I have not
investigated this further for other repeater controls.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top