U
Urs Eichmann
If I have two webforms, form1.aspx and form2.aspx, and I want to do a
Response.Redirect from form1 to form2, I can write
Response.Redirect("form2.aspx")
However, if somebody changes the name of form2, the redirect will no
longer work. I could write
Response.Redirect(GetType(form2).Name + ".aspx")
but this is quite ugly and will still not work i.e. if the form2 is
being moved to a sub folder. Worse, I'll only detect it at runtime and
get no compiler warning or such. Compared to winforms, when I'm writing
Dim f as New Form1
f.ShowDialog
if I now change the name of the Form1 class, or the namespace, I will
get a compiler warning.
Is there any "safe" possiblity of redirecting to another webform which
doesn't rely on the physical name and location of an aspx file, and
could be detected at compile time?
Perhaps I'm missing something obvious here...
Thanks for any help
Urs
Response.Redirect from form1 to form2, I can write
Response.Redirect("form2.aspx")
However, if somebody changes the name of form2, the redirect will no
longer work. I could write
Response.Redirect(GetType(form2).Name + ".aspx")
but this is quite ugly and will still not work i.e. if the form2 is
being moved to a sub folder. Worse, I'll only detect it at runtime and
get no compiler warning or such. Compared to winforms, when I'm writing
Dim f as New Form1
f.ShowDialog
if I now change the name of the Form1 class, or the namespace, I will
get a compiler warning.
Is there any "safe" possiblity of redirecting to another webform which
doesn't rely on the physical name and location of an aspx file, and
could be detected at compile time?
Perhaps I'm missing something obvious here...
Thanks for any help
Urs