473,387 Members | 1,502 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,387 software developers and data experts.

simple problem - need something like IsNull

NH
Hi,

I am passing some paramaters to a function is asp.net (vb.net). The values
come from a textbox, how can I pass in a zero by default if the user tries to
enter a blank space?

I have..

BLL.Forecast.SaveChanges_DaysForecast(dgItem.Cells (21).Text)

I want something like
BLL.Forecast.SaveChanges_DaysForecast(IsSpace(dgIt em.Cells(21).Text,0))

Any ideas?

Nov 19 '05 #1
2 933
Public Function IsSpace(ByVal textEntered As String) As String
'---Replace spaces in check with nothing (in case user has entered more
than one space)
If textEntered.Replace(" ", "").Length = 0 Then
Return "0"
Else
Return textEntered
End If
End Sub

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"NH" <NH@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
Hi,

I am passing some paramaters to a function is asp.net (vb.net). The values
come from a textbox, how can I pass in a zero by default if the user tries
to
enter a blank space?

I have..

BLL.Forecast.SaveChanges_DaysForecast(dgItem.Cells (21).Text)

I want something like
BLL.Forecast.SaveChanges_DaysForecast(IsSpace(dgIt em.Cells(21).Text,0))

Any ideas?

Nov 19 '05 #2
NH
Thanks, that will work. I thought maybe there was an inbuilt function I didnt
know about it.

"S. Justin Gengo" wrote:
Public Function IsSpace(ByVal textEntered As String) As String
'---Replace spaces in check with nothing (in case user has entered more
than one space)
If textEntered.Replace(" ", "").Length = 0 Then
Return "0"
Else
Return textEntered
End If
End Sub

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"NH" <NH@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
Hi,

I am passing some paramaters to a function is asp.net (vb.net). The values
come from a textbox, how can I pass in a zero by default if the user tries
to
enter a blank space?

I have..

BLL.Forecast.SaveChanges_DaysForecast(dgItem.Cells (21).Text)

I want something like
BLL.Forecast.SaveChanges_DaysForecast(IsSpace(dgIt em.Cells(21).Text,0))

Any ideas?


Nov 19 '05 #3

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

Similar topics

1
by: Roy | last post by:
Ok. Call me dumb, but why is this occurring. Table firstv has 303,000 records, table lla has 10,000 records. When I run this query though: SELECT IsNull(lla.voy, '') as voy, IsNull(lla.poe, '')...
4
by: JC Mugs | last post by:
Below is a simple procedure, but I am new to this. I need to add an error check that sees if there is they accidently push this button when they have not made an invoice. The check should be...
5
by: Tim::.. | last post by:
Can someone tell me how I convert this simple SQL statement so I can use it in ASP.NET??? I have an issue with the quotation marks and wondered if there is a simple rule for converting the sql...
11
by: Geagleeye | last post by:
Hi, Im a rookie in vba, and therefor got a problem. i do have folwing records F G --------------- 2 3 2 5 6 7
1
by: inarobis | last post by:
Hello, I am newbie in Xquery and i would like to do a simple group by date and ID. so a piece of my xml file. <Authors> <Author> <ID>1</ID> <Date>30.07.2000</Date>
3
by: nikolap | last post by:
Hi can someone help me I'm brainless, I need to add a field from a third database to this view CREATE View mProduct_Search As Select mProduct.*,
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
4
by: access baby | last post by:
i have a huge database based on date and time need to create different report we need to measure our work processes how many order received , order cancelled, completed and count of items completed...
4
by: Wook | last post by:
Ok I got a set of Forms Reports etc it goes like this Reports Form Passes a Filter to the report for the needed results The filter it passes along is fine except one problem I need a way for the...
8
by: mvdave | last post by:
Hello all & I hope I'm posting in the right place.. I need to load a temporary table with a range of sequential dates, passing it a beginning and an end date from a criteria form. I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.