Click here to Skip to main content
15,912,665 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPageMethods return value !!!!!!! Pin
zeeShan anSari14-Aug-09 7:24
zeeShan anSari14-Aug-09 7:24 
AnswerRe: PageMethods return value !!!!!!! Pin
Not Active14-Aug-09 10:23
mentorNot Active14-Aug-09 10:23 
QuestionNeed Assistance with Collapsible Content (C#) Pin
ahayw0114-Aug-09 6:28
ahayw0114-Aug-09 6:28 
AnswerRe: Need Assistance with Collapsible Content (C#) Pin
Abhishek Sur14-Aug-09 9:40
professionalAbhishek Sur14-Aug-09 9:40 
QuestionBrowser Print Preview Background Color And Image Setting Pin
Civic0614-Aug-09 4:20
Civic0614-Aug-09 4:20 
AnswerRe: Browser Print Preview Background Color And Image Setting Pin
Abhijit Jana14-Aug-09 4:25
professionalAbhijit Jana14-Aug-09 4:25 
AnswerRe: Browser Print Preview Background Color And Image Setting [modified] Pin
Abhishek Sur14-Aug-09 5:51
professionalAbhishek Sur14-Aug-09 5:51 
QuestionProblem in Javascript Pin
janani1314-Aug-09 3:58
janani1314-Aug-09 3:58 
Hi all,

Im using JS to check the date and month validation. If i give 08-14-1949
the month value return as 0 not as 8 and the same problem for 09-14-1983.
These two month value is considered as 0. I cant resolve it. Please help me.
Code.
function checkyear(source, arg) {
    var txtDOB = arg.Value;
    var birthdate = txtDOB.split("/");
    var yearvalue = parseInt(birthdate[2]);
    var MonthValue = parseInt(birthdate[0]);
    var DayValue = parseInt(birthdate[1]);
    var date = new Date();
    alert(yearvalue);
    alert(MonthValue);
    alert(DayValue);
    var CurrentYear = date.getFullYear();
    if (MonthValue < 1 || MonthValue > 12) {
        alert(MonthValue);
        source.errormessage = "Please enter a valid Date of birth";
        arg.IsValid = false;
        return;
    }
    if (DayValue < 1 || DayValue > 31 || (MonthValue == 2 && DayValue > daysInFebruary(yearvalue))) {

        alert(DayValue);
        source.errormessage = "Please enter a valid Date of birth";
        arg.IsValid = false;
        return;


    }
    if (yearvalue >= CurrentYear - 13) {

        source.errormessage = "Your age should be greater than 13.";
        arg.IsValid = false;
        return;
    }
    else if ((yearvalue <= 1900) || (yearvalue >= CurrentYear)) {
        source.errormessage = "Please enter a valid Date of birth";
        arg.IsValid = false;
        return;
    }
    else {
        arg.IsValid = true;
    }
}
function daysInFebruary(year) {
    // February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.

    return (((year % 4 == 0) && ((!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28);
    alert(((year % 4 == 0) && ((!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28);
}

AnswerRe: Problem in Javascript Pin
Abhishek Sur14-Aug-09 11:35
professionalAbhishek Sur14-Aug-09 11:35 
QuestionUsing SqlBulkCopy Pin
srikantha_nagaraj14-Aug-09 3:52
srikantha_nagaraj14-Aug-09 3:52 
AnswerRe: Using SqlBulkCopy Pin
Abhijit Jana14-Aug-09 4:22
professionalAbhijit Jana14-Aug-09 4:22 
QuestionRe: Using SqlBulkCopy Pin
srikantha_nagaraj14-Aug-09 6:27
srikantha_nagaraj14-Aug-09 6:27 
AnswerRe: Using SqlBulkCopy Pin
Abhishek Sur14-Aug-09 12:17
professionalAbhishek Sur14-Aug-09 12:17 
QuestionSelecting rows in GridView without postback with javascript? Pin
Chesnokov Yuriy14-Aug-09 3:14
professionalChesnokov Yuriy14-Aug-09 3:14 
AnswerRe: Selecting rows in GridView without postback with javascript? Pin
Abhijit Jana14-Aug-09 3:35
professionalAbhijit Jana14-Aug-09 3:35 
QuestionSelect items in gridview using checkbox and move them to another grid. Pin
Member 629328214-Aug-09 2:53
Member 629328214-Aug-09 2:53 
AnswerRe: Select items in gridview using checkbox and move them to another grid. Pin
Suresh Suthar14-Aug-09 3:01
professionalSuresh Suthar14-Aug-09 3:01 
QuestionDoes anyone use mono? [modified] Pin
Jeff Circeo14-Aug-09 1:30
Jeff Circeo14-Aug-09 1:30 
AnswerRe: Does anyone use mono? Pin
padmanabhan N14-Aug-09 1:42
padmanabhan N14-Aug-09 1:42 
GeneralRe: Does anyone use mono? Pin
Jeff Circeo14-Aug-09 1:49
Jeff Circeo14-Aug-09 1:49 
GeneralRe: Does anyone use mono? Pin
Abhishek Sur14-Aug-09 2:15
professionalAbhishek Sur14-Aug-09 2:15 
GeneralRe: Does anyone use mono? Pin
Jeff Circeo14-Aug-09 2:23
Jeff Circeo14-Aug-09 2:23 
GeneralRe: Does anyone use mono? Pin
Abhishek Sur14-Aug-09 3:25
professionalAbhishek Sur14-Aug-09 3:25 
QuestionSwapping the rows and columns Pin
srikantha_nagaraj14-Aug-09 1:19
srikantha_nagaraj14-Aug-09 1:19 
AnswerRe: Swapping the rows and columns Pin
Coding C#14-Aug-09 1:21
Coding C#14-Aug-09 1:21 

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.