Click here to Skip to main content
16,016,306 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: HTML Text Box Pin
Mike Ellison1-May-06 2:42
Mike Ellison1-May-06 2:42 
AnswerRe: HTML Text Box Pin
Kanjinghat3-May-06 23:21
Kanjinghat3-May-06 23:21 
GeneralRe: HTML Text Box Pin
sudharsong4-May-06 0:59
sudharsong4-May-06 0:59 
QuestionCreate installer with VS2005 Pin
awu251-May-06 0:37
awu251-May-06 0:37 
AnswerRe: Create installer with VS2005 Pin
Mike Ellison1-May-06 2:49
Mike Ellison1-May-06 2:49 
QuestionAlert Box Pin
Balwan30-Apr-06 23:03
Balwan30-Apr-06 23:03 
AnswerRe: Alert Box Pin
kirthikirthi30-Apr-06 23:32
kirthikirthi30-Apr-06 23:32 
AnswerRe: Alert Box Pin
R.Prabha Devi30-Apr-06 23:36
R.Prabha Devi30-Apr-06 23:36 
Hi,
On click of the button call a javascript method in code behind,

Below is .aspx.cs page code:

For eg : Let server control button id be 'btnSave'

btnSave.Attributes.Add("OnClick","javascript:return ValidateTextBox();");



.aspx page code :

<script language="javascript">

  function ValidateTextBox()
  {
     //for eg:let the textbox id be 'txtName'

     //First check whether the textbox exists 
     if(document.getElementById("txtName")!=null)
      {
        if(isEmptyCheck("txtName")==true)
	{
		alert("Text box value is empty,please enter value");
		return false;
	}
      }
  }

  //function to check whether text box value is empty or not

  function isEmptyCheck(X)
{
if((document.forms[0].elements[X].value=="") || (document.forms[0].elements[X].value.substring(0,1) == ' '))
	{
		return true;
	}
	return false;
}//end of function
  

 </script>   

Hope this helps you...Smile | :)
AnswerRe: Alert Box Pin
CWIZO1-May-06 0:10
CWIZO1-May-06 0:10 
QuestionHow to make a alert box on Button click Pin
Balwan30-Apr-06 23:00
Balwan30-Apr-06 23:00 
AnswerRe: How to make a alert box on Button click Pin
Sheel Gohe30-Apr-06 23:16
Sheel Gohe30-Apr-06 23:16 
GeneralRe: How to make a alert box on Button click Pin
Balwan30-Apr-06 23:24
Balwan30-Apr-06 23:24 
AnswerRe: How to make a alert box on Button click Pin
R.Prabha Devi30-Apr-06 23:38
R.Prabha Devi30-Apr-06 23:38 
QuestionError: Invalid Viewstate! Pin
wEb GuRu...30-Apr-06 22:11
wEb GuRu...30-Apr-06 22:11 
QuestionGet a reference of HTML Table bound to a GridView Pin
Sheel Gohe30-Apr-06 21:31
Sheel Gohe30-Apr-06 21:31 
AnswerRe: Get a reference of HTML Table bound to a GridView Pin
CWIZO1-May-06 0:11
CWIZO1-May-06 0:11 
AnswerRe: Get a reference of HTML Table bound to a GridView Pin
Kanjinghat3-May-06 23:31
Kanjinghat3-May-06 23:31 
QuestionHTML FileField Pin
myNameIsRon30-Apr-06 19:01
myNameIsRon30-Apr-06 19:01 
AnswerRe: HTML FileField Pin
CWIZO1-May-06 0:11
CWIZO1-May-06 0:11 
GeneralRe: HTML FileField Pin
myNameIsRon1-May-06 8:40
myNameIsRon1-May-06 8:40 
AnswerMight be the answer Pin
OmegaCD1-May-06 16:23
OmegaCD1-May-06 16:23 
QuestionI only change text on my Default.aspx file, but I must compiled project and upload all file in bin folder? Pin
god4k30-Apr-06 19:00
god4k30-Apr-06 19:00 
AnswerRe: I only change text on my Default.aspx file, but I must compiled project and upload all file in bin folder? Pin
CWIZO1-May-06 0:12
CWIZO1-May-06 0:12 
QuestionFinding Cool Web Services Pin
Tim St.Martin30-Apr-06 18:55
Tim St.Martin30-Apr-06 18:55 
AnswerRe: Finding Cool Web Services Pin
minhpc_bk1-May-06 13:54
minhpc_bk1-May-06 13:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.