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.
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.