D
Dica
i apologize for what is no doubt a very rudimentary question, but i'm still
trying to wrap my brain around .net coding habits. in classic asp, if i
wanted to show search results, i'd just post the form data over to another
page or call a showSearchResults sub on the search page. in .net, i can't
post to another page, so i need to show the search results on the same page
as the search form page. i could write a sub in my code behind that would
response.write all the html and dataset info, but i've never been a fan of
doing that (i loose things like colour coded html, have to constantly escape
my quotes, etc). i believe the correct solution should be to simple take the
html i want to use to display the search results and embed that in a sub on
the .aspx page, and then call the sub from my code behind, but i get a
compile error when i try to run it:
Statement cannot appear within a method body. End of method assumed
is this the way i should be doing things? i don't really want to get into
the habit of response.redirect with all the form values appended to query
string, since this means i have to code another results page, and i'd prefer
to keep the number of pages down to a bare minimum for maintenance's sake.
why am i getting an error with trying to embed the search results sub on the
search form page?
tks
trying to wrap my brain around .net coding habits. in classic asp, if i
wanted to show search results, i'd just post the form data over to another
page or call a showSearchResults sub on the search page. in .net, i can't
post to another page, so i need to show the search results on the same page
as the search form page. i could write a sub in my code behind that would
response.write all the html and dataset info, but i've never been a fan of
doing that (i loose things like colour coded html, have to constantly escape
my quotes, etc). i believe the correct solution should be to simple take the
html i want to use to display the search results and embed that in a sub on
the .aspx page, and then call the sub from my code behind, but i get a
compile error when i try to run it:
Statement cannot appear within a method body. End of method assumed
is this the way i should be doing things? i don't really want to get into
the habit of response.redirect with all the form values appended to query
string, since this means i have to code another results page, and i'd prefer
to keep the number of pages down to a bare minimum for maintenance's sake.
why am i getting an error with trying to embed the search results sub on the
search form page?
tks