Re: javascript startupscript
Well Here No need for StartUpScriptBlock u can directly use then following code..
Call the following JS from OnClientClick Event
like
OnClientClick="return Validate()"
/************JS Function****************/
function Validate()
{
isAllValid = true;
if ---check for Validation
{
isAllValid = false;
}
if (isAllValid == true)
{
var c = confirm("Are you sure ?");
if (c == false)
isAllValid = false;
}
return isAllValid;
}
/****************************/
Or if u want to to do so then
ClientScript.RegisterStartUpScript(Me.GetType(),"scriptConfirm", "---Write down js without Script tag---")
Re: javascript startupscript
Hello,
Just my two cents worth, but given that you are using 2005, depending on what sort of validation you are doing, it may be worthwhile looking into the Validation Controls that are available from the ToolBox, i.e.
RequiredFieldValidator
RangeValidator
RegularExpressionValidator
CompareValidator
CustomValidator
ValidationSummary
These can simpl be dragged and dropped on the form, and then "connected" to a control to perform the validation for you.
Hope this helps!
Gary