asp.net 2.0 a few Noob questions

W

webmaster

I've been playing around with asp.net 2.0/vs.net 2005/C# 2005 - I had a
few noob questions.

1. Is there a setting that sets all current and future controls on a
page to position absolutely automatically so that I don't have to set
this sytle every time?

2. I'd like to code have a "New" button, that when selected makes
visible a detailview in insert mode and with only the insert command
available. I would imagine I'd be adding an onclick event for the
button that makes the control visible, but how would I graphically
configure edittemplate (I think) for the control to only exist in
insert mode? Perhaps my approach is wrong.

3. How do I dynamically set the ErrorMessage of a custom validator?

This code works with the preset ErrorMessage.

protected void CustomValidator1_ServerValidate(object source,
ServerValidateEventArgs args)
{
if (TextBox1.Text.Length < 1)
{
args.IsValid = false;

}

}

Thanks.
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top