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
Guest User
Tech Writer
26
3.9k
What can be my if statement?
Aug 23 2018 3:46 AM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private bool IsFilled()
{
if (TextBox1.Text == "" || TextBox2.Text == "" || TextBox3.Text == "")
{
if (TextBox1.Text == "")
{
Label1.Visible = true;
}
else
Label1.Visible = false;
{
}
if (TextBox2.Text == "")
{
Label2.Visible = true;
}
else
Label2.Visible = false;
{
}
if (TextBox3.Text == "")
{
Label3.Visible = true;
}
else
Label3.Visible = false;
{
}
return true;
}
else
{
Label1.Visible = false;
Label2.Visible = false;
Label3.Visible = false;
return false;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (IsFilled())
{
//what can be my if statement?
}
else
{
//what can be my else statement?
//like im going to state here that its already successful?
}
}
}
Reply
Answers (
5
)
UWP app setup project
How to verify if a static class is running/active