Datalist validations. . .

R

rvsraghu

I have a datalist control in my page and there is a Textbox to enter the
data like username or location. (Basically used to enter a single data at a
time.) now i want to validate the control in such a way that, if the user
didnt enter any data in the text box, user should be warned with the error.
.. .
please try to help me is there any way to validate the textbox.
Raghuram
 
K

Karl Seguin

Can't you just dump a RequiredFieldValidator within the ItemTemplate:

<ItemTemplate>
<asp:TextBox ID="x" Runat="server" />
<asp:RequiredFieldValidator ID="reqx" ControlToValidate="x" Runat="server"
ErrorMessage="*" />
</ItemTemplate>

?

karl
 
R

Raghuram

thankyou very much . . .
my problem got solved
there is one more thing

like in case of datagrid there is option to set no of records per page in
the same way is there any option to set the page records in datalist
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top