Hi Dilipv,
Here is the solution of your problem, i just wrote this code but not tested, you have to test your self.
write this code under "Head" section.
<script language="javascript">
function vld()
{
if(document.form1.TextBox1.value == "")
{
return false;
}
else
{
return true;
}
}
function test()
{
if(vld())
{
return confirm("Entry was submitted");
}
else
{
return false;
}
}
function confirmVld()
{
if(test())
{
alert("Success");
document.write("Your page will be redirected shortly....<meta http-equiv='refresh' content='1; url=http://www.yahoo.com' //>");
}
else
{
alert("Entry was not submitted");
return false;
}
}
</script>
then add button attribute in your cs file like this.
this.Button1.Attributes.Add("OnClick", "confirmVld()");
Hope this will help you, feel free to ask any thing if u still feel some problem.
Enter your message below
Sign in or Join us (it's free).