From the following link, you can see all types of formats we can get using DateTime.ToString() method.More I...
Friday, February 26, 2010
Converting DateTime to ShortDate in SQL
When you need to get datetime field value in short date, use the following:To get today's date in YYYYMMDD format: SELECT CONVERT(CHAR(8), GETDATE(), 112)To get today's date in mm/dd/yyyy:CONVERT(VARCHAR(10), GETDATE(), 101)Helpful L...
Monday, February 15, 2010
Showing JavaScript confirmation after Client Validation
Some time we use javascript to display alert or confirmation box on button click. But, if we are using ajax validation on that page, that will work only after post back if we click ok on the confirmation box. So, to display the confirmation box, only if the page is valid, Check this l...
Thursday, February 4, 2010
Finding the Public Key Token of dll
You have to add assembly to web.config like the followingHow to get the public token of a dll to add it to web.config?Learn M...
Wednesday, February 3, 2010
Calling method of a usercontrol from another usercontrol
I need to call the method in a usercontrol from another usercontrol. Both controls are placed in same page. If it is a web application, both controls will be in same namespace. So, we can get their names in the codebehind. for eg. if control1 is to be found from control2. both control1 and control2 are in folder controls. webapplication name is test. So the namespace would be test.control2. Since,...
Finding Controls
Check the name of the control in the rendered html. For eg. I need to find gridview "grdwSelectedCandidates" in usercontrol "SelectedCandidates.ascx" which is inside the ajax tabpanel inside ajax tabcontainer.I need to find this from another control which is placed in another tabpanel in the same container. The rendered name is "ctl00_ContentPlaceHolder1_TabContainer1_TabPanel6_SelectedCandidates1_grdwSelectedCandidates"So,...