TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ajay Singh
NA
1
0
Return null from function
Aug 23 2006 5:21 PM
I have some textboxes. I want to read their value and find if they are null or not. If the value is empty I want to return null as I will be creating a dynamic insert Sql statement. I created the Datahelper class with various functions like
public
static
string
GetString(
string
text) //text value comes from TextBox.Text
{
if
((text ==
null
) || (text.Trim().Length == 0))
{
return string.Empty;
}
//return null;
// System.DBNull.Value;
return
text;
}
This is giving me ""and not null. I want to store null in database and not "".
Reply
Answers (
1
)
web service help
Radiobutton list