Click here to Skip to main content
15,924,901 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Set css class of a TR in c# code Pin
Chetan Ranpariya19-Jun-07 1:07
Chetan Ranpariya19-Jun-07 1:07 
Questionhow to print an excel file? Pin
pradeep kumarappagari19-Jun-07 0:30
pradeep kumarappagari19-Jun-07 0:30 
AnswerRe: how to print an excel file? Pin
Chetan Ranpariya19-Jun-07 0:40
Chetan Ranpariya19-Jun-07 0:40 
GeneralRe: how to print an excel file? Pin
pradeep kumarappagari19-Jun-07 0:47
pradeep kumarappagari19-Jun-07 0:47 
GeneralRe: how to print an excel file? Pin
Chetan Ranpariya19-Jun-07 0:50
Chetan Ranpariya19-Jun-07 0:50 
GeneralRe: how to print an excel file? Pin
pradeep kumarappagari19-Jun-07 0:53
pradeep kumarappagari19-Jun-07 0:53 
AnswerRe: how to print an excel file? Pin
badgrs19-Jun-07 1:33
badgrs19-Jun-07 1:33 
AnswerRe: how to print an excel file? Pin
sPaudel20-Jun-07 18:44
sPaudel20-Jun-07 18:44 
Questionmail going to spam or bulk folder..plz help.. Pin
hkchauhan19-Jun-07 0:04
hkchauhan19-Jun-07 0:04 
AnswerRe: mail going to spam or bulk folder..plz help.. Pin
Sylvester george19-Jun-07 0:07
Sylvester george19-Jun-07 0:07 
GeneralRe: mail going to spam or bulk folder..plz help.. Pin
wEb GuRu...19-Jun-07 0:41
wEb GuRu...19-Jun-07 0:41 
GeneralRe: mail going to spam or bulk folder..plz help.. Pin
hkchauhan19-Jun-07 0:49
hkchauhan19-Jun-07 0:49 
AnswerRe: mail going to spam or bulk folder..plz help.. Pin
N a v a n e e t h19-Jun-07 2:48
N a v a n e e t h19-Jun-07 2:48 
GeneralRe: mail going to spam or bulk folder..plz help.. Pin
hkchauhan19-Jun-07 3:16
hkchauhan19-Jun-07 3:16 
AnswerRe: mail going to spam or bulk folder..plz help.. Pin
hkchauhan19-Jun-07 18:28
hkchauhan19-Jun-07 18:28 
QuestionAsp.net Website Hosting Pin
ShuklaGirish18-Jun-07 23:55
ShuklaGirish18-Jun-07 23:55 
AnswerRe: Asp.net Website Hosting Pin
Sylvester george19-Jun-07 0:06
Sylvester george19-Jun-07 0:06 
QuestionSession_End not firing in normal run [modified] Pin
Tahir Saleem18-Jun-07 23:48
Tahir Saleem18-Jun-07 23:48 
AnswerRe: Session_End not firing in normal run Pin
ToddHileHoffer19-Jun-07 1:22
ToddHileHoffer19-Jun-07 1:22 
Questionremember me feature in asp.net 1.1 Pin
deepalititi18-Jun-07 23:46
deepalititi18-Jun-07 23:46 
AnswerRe: remember me feature in asp.net 1.1 Pin
kumarjammula19-Jun-07 0:08
kumarjammula19-Jun-07 0:08 
GeneralRe: remember me feature in asp.net 1.1 Pin
deepalititi19-Jun-07 2:11
deepalititi19-Jun-07 2:11 
QuestionASP.NET+Javascript [modified] Pin
Bajrang Singh18-Jun-07 23:43
Bajrang Singh18-Jun-07 23:43 
Hi All,
I am trying Javascript for Validation of a new User Registration.
I want to know whether user already exits or not.
I m trying to check it on Submit button. I want to do it through Javascript.
I confused while mixing the code of javascript and ASp.net.
I created a string array of all user already exist.
now I want to check it in java script for new user's name.
I m new to javascript.
Please guideme thanks in advance,.
Asp:
protected void Page_Load(object sender, EventArgs e)<br />
    {<br />
        con = new OleDbConnection();<br />
        con.ConnectionString = conString;<br />
        con.Open();<br />
        <br />
        cmdSelect = new OleDbCommand("select * from User_Information", con);<br />
        da = new OleDbDataAdapter("select * from User_Information",con);<br />
        ds = new DataSet();<br />
        da.Fill(ds);<br />
        ArrayPassword = new string[100];<br />
        ArrayNames = new string[100];<br />
        for (i= 0; i < ds.Tables[0].Rows.Count;i++ )<br />
        {<br />
            ArrayNames[i]=(ds.Tables[0].Rows[i].ItemArray[0].ToString());<br />
            ArrayPassword[i]=(ds.Tables[0].Rows[i].ItemArray[1].ToString());<br />
        }<br />
        int j = ArrayNames.Count;<br />
        string arr = ArrayNames;<br />
        //Response.Write(ArrayNames[j - 1].ToString());<br />
 }


Javascript:
function Validate()<br />
{<br />
  for (var i=0;i<document.forms[0].elements.length; i++) <br />
  {	<br />
         var val=document.forms[0].elements[i].value;	<br />
	     if(val=="")<br />
         {<br />
            //alert(document.forms[0].elements[i].name+" can't be left  blank");<br />
            alert("Please Enter the "+document.forms[0].elements[i].name+ " !");<br />
            document.forms[0].elements[i].focus();<br />
            return false;<br />
	    }	<br />
  }<br />
  document.forms[0].action="Default3.aspx";<br />
  var User_name=document.forms[0].elements["Name"].value;<br />
  var User_password=document.forms[0].elements["Password"].value;<br />
  var i=<%=i%>;<br />
  var j; <br />
  var arrayNames=<%=ArrayNames%> ; // ERROR COMES IN THIS LINE....ANY CLUE<br />
  for(j=0;j<i;j++)<br />
  {<br />
        if(User_name==arrayNames[j])<br />
            alert("User Exists");<br />
        else<br />
            alert("User not Exists");<br />
  }<br />
  <br />
  <br />
  // document.forms[0].action="Default3.aspx";<br />
  // return true;<br />
}



-- modified at 7:54 Tuesday 19th June, 2007


-- modified at 8:29 Tuesday 19th June, 2007

Bajrang Singh
Using .net 2.0 (VS2005)

AnswerRe: ASP.NET+Javascript Pin
RepliCrux19-Jun-07 0:44
RepliCrux19-Jun-07 0:44 
GeneralRe: ASP.NET+Javascript Pin
RepliCrux19-Jun-07 12:39
RepliCrux19-Jun-07 12:39 

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.