Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to run this when page loads?

Reply
Thread Tools

How to run this when page loads?

 
 
Miguel Dias Moura
Guest
Posts: n/a
 
      12-09-2004
Hello,

I have an ASP.NET/VB web page (search.aspx) with a search form.
When the button is pressed the keywords are passed like this:

Sub searchClick(sender As Object, e As System.EventArgs)
Response.Redirect("search.aspx?list=" & Request.Form("keywords"))
End Sub

To split the keywords I can use:
string[] aryValues = Request.QueryString("search").Split(' ');

How can I run this when the page is loaded and only if "list" is not
empty?

Thanks,
Miguel





 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      12-09-2004
"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I have an ASP.NET/VB web page (search.aspx) with a search form.
> When the button is pressed the keywords are passed like this:
>
> Sub searchClick(sender As Object, e As System.EventArgs)
> Response.Redirect("search.aspx?list=" & Request.Form("keywords"))
> End Sub
>
> To split the keywords I can use:
> string[] aryValues = Request.QueryString("search").Split(' ');
>
> How can I run this when the page is loaded and only if "list" is not
> empty?


You can put the code in Page_Load.


John Saunders


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I would like to sell my web page - You can run your own business with this web page! JPastor HTML 1 06-07-2007 09:47 AM
modify master page from sub page in run time =?Utf-8?B?Tmljaw==?= ASP .Net 3 11-12-2006 07:56 AM
If server process is running, return last page state w/ msg AND w/o allowing page code to run (db activity) ack95 ASP .Net 0 03-03-2006 08:17 PM
How to explicitly run page javascript every time the page load? Jensen bredal ASP .Net 2 10-06-2005 09:10 AM
Run Perl From Web Page W/out Changing Page? Hal Vaughan Perl 0 04-23-2004 01:00 AM



Advertisments