B
ben
I have a web application whic connects to the database and populates a
datagrid based on 2 fields the user enters on the web form.
I have a try catch block to make sure that in case the user enters
values(dates) not found in database, then i redirect the user to the
origianl page where they enter the values.
I would like a message box saying they entered invalid dates(not a
check for date format, but that they entred dates which dont return
any values in the db, n hence the db error)
so far, i have this
catch
{
Response.Write("<script>window.alert('No Entries Found.')</script>");
}
I would like the user to be redirected to the date entry field after
clicking this messagebox.How do i do that? If i try to add
Response.Redirect("Main.aspx") after the response.write, it ignores
the message box and simply redirects, whic is not what i want.
Any inputs wud be appreciated
THanks
datagrid based on 2 fields the user enters on the web form.
I have a try catch block to make sure that in case the user enters
values(dates) not found in database, then i redirect the user to the
origianl page where they enter the values.
I would like a message box saying they entered invalid dates(not a
check for date format, but that they entred dates which dont return
any values in the db, n hence the db error)
so far, i have this
catch
{
Response.Write("<script>window.alert('No Entries Found.')</script>");
}
I would like the user to be redirected to the date entry field after
clicking this messagebox.How do i do that? If i try to add
Response.Redirect("Main.aspx") after the response.write, it ignores
the message box and simply redirects, whic is not what i want.
Any inputs wud be appreciated
THanks