Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Calculating the difference between two dates range is 30 days in javascript or validation to Check end date is not greater than start date and two dates range is not more than 30 days using ajax and javascript in asp.net

Aug 22, 2010 3 comments
Introduction:

Here I will explain how to check end date greater than start date and check two dates difference range is 30 days or not using asp.net.

Description:

Previously I explained how to use Ajax Collapsible panel . I explained many articles on Ajax now I will explain to how to set validation to check end date greater than start date or not and check two dates difference range is 30 days using Ajax validator controls. 


JavaScript Enable/disable Button based on text in textboxes in asp.net

8 comments
Introduction
Here I will explain how to enable/disable button whenever user enter text in textboxes using JavaScript in asp.net
Description
I have taken two textboxes and one button now I need to write functionality like to enable button if user enter text in two textboxes. For this we need to test whenever user entering text in textboxes at that time we need to raise onkeyup event for particular textbox. By default this event is not available for textbox in asp.net but we have a chance to use this event for textbox. Here I am enabling button whenever user enters text in two textboxes using JavaScript.

how to change the error message of custom validator dynamically using asp.net

2 comments
Introduction

Here I will explain how to change the error message of custom validator dynamically using asp.net.

Description

I have one textbox, one button and one custom validator to validate the textbox whenever user clicks on button.
In customvalidator I have taken ClientValidationFunction="ClientValidationFunction" this clientside function is used to send error message dynamically by using sender object. This sender object will display ErrorMessage dynamically.


Opening Child window from Parent window after selecting data from child window closing the child window and displaying that data in parentwindow using asp.net

Aug 15, 2010 2 comments

Here i will explain how to opening Child window from Parent window after selecting data from child window closing the child window and displaying that data in parent window using asp.net

Here based on my requirement i have taken one textbox and one image button i want to search for the email ids exists in database whenever the user clicks on the image button i need to open one child window like this

Calculating the differece between two dates is one month in javascript using asp.net

Aug 12, 2010 3 comments
Hi i have written one javascript function to find the two dates difference is one month

i am having two textboxes startdate and enddate. Now i want to write clientside javascript function to check the dates difference is one month or not if the user enter more than one month date range i want to raise error message.i have written it in server side but i want to write clientside javascript function to check dates range. i have searched for this many sites i have found the solution but they are finding the difference between two dates i.e number of days and they are taking by default 30 days difference for one month .Suppose user enter 2/1/2010(Feb/01/2010) and 3/3/2010(March/03/2010) how can we calculate in February we have only 28 days if we allow user up to 30 days means that not right way . So i have already written server side function for validating textboxes for date range based on that server side function i have implemented client side function (i.e.,javascript function)

Caluculating the today date minus one month in asp.net

2 comments
Now my requirement is to get the today date minus one month that is 30 days 

i will write the following code to get that like the date

 tbStartDate.Text = DateTime.Today.AddDays(-30).ToShortDateString();

by using above statement we can get the value of today date minus  one month




Lightbox Effect For Login Page in asp.net

Aug 11, 2010 22 comments
Introduction

Here I will explain how to create lightbox effect for Login Page in asp.net

Description:

One day I got requirement like showing login page with popup window at that time I used lightbox effect for my login page to display in popup window.

To display login page with lightbox effect First we need to desgin Login Page like this

Call javascript function from codebehind in asp.net

Aug 9, 2010 18 comments
Here i will explain how to call javascript function from codebehind without assigning it to any control in asp.net.

We can call javascript functions in two ways

first way is


 System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "document.getElementById('" + button2.ClientID + "').style.display='none';", true);
Seconda way you can call javascript function also

Other Related Posts

© 2010-2012 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.