Quantcast
Channel: CodeProject Latest postings for ASP.NET
Viewing all articles
Browse latest Browse all 3938

Get text in a textbox

$
0
0
Good morning every body! Please help me out in this since I can't really figure out what is wrong.
I have a datalist control that displays posted status. Inside this datalist is a textbox control and a button 'Add idea'. I want visitors to add their own idea so I used this code
PublicSub AddIdea(ByVal sender AsObject, e As DataListEventsCommand...)
Dim txt As TextBox = e.Item.FindControl("txtidea")
If txt.Text <> ""Then
MsgBox (txt.Text)
Else
MsgBox ("No idea entered")
EndSub
But if the Add idea button is heat, the msgbox returns an empty string. Help please.

Viewing all articles
Browse latest Browse all 3938


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>