473,659 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to run this when page loads?

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(sen der As Object, e As System.EventArg s)
Response.Redire ct("search.aspx ?list=" & Request.Form("k eywords"))
End Sub

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

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

Thanks,
Miguel

Nov 19 '05 #1
1 978
"Miguel Dias Moura" <md*REMOVE*mour a@*NOSPAM*gmail .com> wrote in message
news:Ol******** ******@TK2MSFTN GP15.phx.gbl...
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(sen der As Object, e As System.EventArg s)
Response.Redire ct("search.aspx ?list=" & Request.Form("k eywords"))
End Sub

To split the keywords I can use:
string[] aryValues = Request.QuerySt ring("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
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1804
by: techy techno | last post by:
hiii I wanted to know how can I check for a specific HTML tag or user defined TEXT and delete it when the page loads Whenver the IE loads the page my company add its COMPANY NAME in my office on any page so what I want to do is to check for my company name b4 the page loads and remove the company name and then load the page. I want to do this in JS
4
1627
by: starwiz | last post by:
I'm trying to use the DataGrid's editing with a DropDownList. I've tried using every code sample I've seen and none of them seem to be able to solve my problem. When I call e.Item.FindControl("name-of-my-DropDownList"), where e is a DataGridCommandEventArgs passed to the UpdateCommand of the DataGrid, I get an empty DropDownList. In fact, when I call e.Item.FindControl("name-of-a-label") in the non-editable portion of my template, I...
7
1848
by: Simon Harvey | last post by:
Hi everyone, I'm having a frustrating problem and I don't know how to fix it without totally redoing a very complicated couple of pages on my site. I really hope some kind soul can help me :-) Its a very simple situation: I have 1 page that serves to create and update users and another page to add roles to the user.
1
4103
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem: I dynamically add an htmlcheckbox to a webform in the pages render and set the checked value to true. When the page loads, if I remove the check from the checkbox and then submit it, in the submit event the checkbox' checked value is still...
3
2880
by: Alex | last post by:
Sorry if this is not a correct forum to post to. I have a page from my service provider that loads 1000's of table cells. These cells load for 3-4 mins and links on that page usually not available untill the whole page loads. I need to find a way to "skip" load of these cells. Problem is that GreaseMonkey work only on a fully loaded page. What happens is that the page loads 3-4 mins and then the cells go away once the page loads and...
2
6380
by: Steve JORDI | last post by:
Hi, I'm having a little trouble trying to update a page content when the user clicks a check box. Basically, I need to reload a page to update its content depending on that checkbox status. I have added a checkbox that has an onClick event that calls a javascript function that loads the form itself and adds a GET variable in the url so that I can check which data I have to display.
9
6199
by: Edward | last post by:
IE6 only displays certain text on my site if you mouse over it (!). I reduced the HTML down to this code below which still shows this effect/bug. My temporary solution was to take out all the comments from my HTML. I reproduced this effect on two computers which use IE6. Why will IE6 not show the first line of text below when the page loads? To see this effect for yourself, view this page online at:
4
2679
by: Nicolas R | last post by:
Hi all, Im trying to figure out how to display a 'loading' message when scripts are being executed, ie when the page is still not ready for interaction. This is for a web app which relies on javascript to insert dom elements and do stuff, so the user must know when everything is ready to interact with. I tried using an interval which checks for a specific variable (page_loading) and when its set to false then the 'loading' message is...
17
4071
by: handique | last post by:
Hi, I have javascript code for rotating images, but the rotation starts only when mouse is placed over the image. But i want to rotate images automatically when the page loads. Can any guide me in this regard. the javscript for rotating images is : mg src="'+mImages.src+'" onmouseover="this.src=\''+mImagesO.src+'\'" onmouseout="this.src=\''+mImages.src+'\'" border=0 id="img'+this.a3+'" style="cursor:pointer I want to replace...
0
1636
by: Silgd1 | last post by:
Hi All..... I have written a method in a java class that accesses the mysql backend db to check if a process is still running. If the process is still running, a JOptionPane is produced informing the user of this and offers an <ok> option(to check the process status again) and a <cancel> option(to redirect the user to the homepage). If the process is completed, I want the page to just load as normal. I want this method to be called before the...
0
8330
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8626
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.