473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to create this condition?

Hello,

I use the following VB code call a page and pass a form value in the
url:

<script runat="server">
Sub goToPage(sender As Object, e As System.EventArgs)
Response.Redirect("page.aspx?city=" & Request.Form("form"))
End Sub
</script>

I want to NOT redirect when the form value is "".
Can you tell me how to do it?

Thanks,
Miguel

Nov 19 '05 #1
2 912
maybe i'm misunderstanding ur problem, but here goes :

if request.form("form") <> string.empty then
'' redirect here
end if
"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:#6**************@TK2MSFTNGP09.phx.gbl...
Hello,

I use the following VB code call a page and pass a form value in the
url:

<script runat="server">
Sub goToPage(sender As Object, e As System.EventArgs)
Response.Redirect("page.aspx?city=" & Request.Form("form"))
End Sub
</script>

I want to NOT redirect when the form value is "".
Can you tell me how to do it?

Thanks,
Miguel

Nov 19 '05 #2
> <script runat="server">
Sub goToPage(sender As Object, e As System.EventArgs)
Response.Redirect("page.aspx?city=" & Request.Form("form"))
End Sub
</script>

I want to NOT redirect when the form value is "".
Can you tell me how to do it?


Dim city As String
city=Request.Form("form")
If (Not city = String.Empty) Then
Response.Redirect("page.aspx?city=" & city)
End If

Anders Norås
http://dotnetjunkies.com/weblog/anoras
Nov 19 '05 #3

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

Similar topics

4
by: amywolfie | last post by:
I've been trying to do something for about 3 days – I get close, but not 100%. I am trying to: Open frmRevisionHistory from a button on frmFeeInput. If there is NO RELATED RECORD, then I...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
1
by: Islam Elkhayat | last post by:
I have to 2 Data classes have the same methods with defferent implemention which work with 2 tables in the database.. I want to chnge the instance referance depend on if condition or switch case.....
3
by: Roy Hills | last post by:
I'm writing a local patch, which will be applied to several different source files. To prevent my local variables from clashing with those in the main source file, I want to create a new scope. ...
2
by: mael.iosa | last post by:
Hi, I'm new to this group and fairly new to Access. I have a bunch of data, and after several other queries, I generate the following query which has two fields: Bin, Time 20 3.5 20 3.9 20...
4
by: joh12005 | last post by:
Hello, i posted for suggestions a little idea even if it still needs further thoughts but as i'm sure you could help :) if would like to implement some kind of Condition class which i coud...
16
by: Claudio Grondi | last post by:
Sometimes it is known in advance, that the time spent in a loop will be in order of minutes or even hours, so it makes sense to optimize each element in the loop to make it run faster. One of...
0
by: snowman81 | last post by:
Hi all, i need to create a web setup project with launch condition of MS SQL and SAP B1. at same time i need to install my database buring the installation how can i do that?
1
by: navanethanmca | last post by:
Hi All, My need is, How can i create a session in side a javascript function, and once check the session, if condition is true then redirect into one page or condition false redirect into...
0
by: RN1 | last post by:
I have a DataGrid with an EditCommandColumn. In the EditCommand sub of the DataGrid, there is an If condition. This If condition is True for some rows in the DataGrid whereas it is False for the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...

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.