asudhaa
asked on
Popup window in same page and not in am empty page
Hi,
I am new to ASP.NET and C #.I am creating a web page with dynamically created textboxes.I submit these textbox values into the database.Before I click the Submit button I would like to check whether all the all the textbox values are entered and if any of the textbox is empty I would like to show a popup window stating that "Kindly enter all the values"
This function works for me.But this popup window does not appear in the same page and it pops up in an empty background page and once I click OK i come back to my original page.
I would like to have the pop up window in my original page where I click the Submit Button and not an empty page.
Can anyone help me to achieve this.
I used the code below
I am new to ASP.NET and C #.I am creating a web page with dynamically created textboxes.I submit these textbox values into the database.Before I click the Submit button I would like to check whether all the all the textbox values are entered and if any of the textbox is empty I would like to show a popup window stating that "Kindly enter all the values"
This function works for me.But this popup window does not appear in the same page and it pops up in an empty background page and once I click OK i come back to my original page.
I would like to have the pop up window in my original page where I click the Submit Button and not an empty page.
Can anyone help me to achieve this.
I used the code below
if (tb.Text == String.Empty)
{
Response.Write("<script language='javascript'>alert('Kindly enter all the values')</script>");
return ;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
string strScript = "<script language='JavaScript'>aler
Page.RegisterStartupScript