Since you are generating the form dynamically in this way, you are
outside the ASP.NET control model, and you'll need to also dynamically
generate the validation.
ASP.NET ultimately renders HTML text and client-side scripts, so one
way to figure out what you need to create for the validation is to
create the page using standard asp.net controls along with the
validators you want to use and see what it ends up rendering to the
client. You can then see what you would need to add to your output to
validate the controls on the client side.
You'll need to create your own server-side validation as well on the
form-variables returned by the postback.
All of this is going to be A LOT OF WORK. Your time might be better
spent by actually adding the ASP.NET controls and their associated
validators dynamically to the page and taking better advantage of the
infrastructure built into ASP.NET instead of using it as a simple HMTL
generator.
On 3/14/06, shyms05 <[EMAIL PROTECTED]> wrote:
> hi to all,
>
> i want to put validation in a text field, but it is generated
> dynamically.here's the code
>
> it's in the code behind
>
> Response.Write("<form action=add.aspx method=post name=frm1 >")
>
> Response.Write("<tr>")
> Response.Write("<td>")
> Response.Write
> ("Quantity:")
> Response.Write("</td>")
>
> Response.Write("<td>")
> Response.Write("<input type=text name=txtqty size=5 >")
> Response.Write("</td>")
> Response.Write("</tr>")
>
> Response.Write("<tr>")
> Response.Write("<td>")
> Response.Write("</td>")
> Response.Write("<td>")
> Response.Write("<input type=submit name=submit value=Add_to_Cart
> STYLE=background-color:5475B2;font-size:8pt;color:ffffff >")
> Response.Write("</td>")
> Response.Write("</tr>")
> Response.Write("</table>")
>
> how can i input validation in it?
>
> thanking u in advance
>
> regards
> shyms
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
--
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNet2/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/