Suresh Behera

The Microsoft .Net Junkies

News

Blogroll

Reading

ValidatorCalloutExtender does not kick flyout after first submit click

If you have multiple validation control and using ValidatorCalloutExtender,You might have exprience that it does not kick fly out all the time after your first submit click. Well, this sounds like bug and does not have straight fix on it.

Solution:
The funny part  is you can solve this problem by simple by using "SetFocusOnError=True" on your respective RequiredFieldValidator. This is little bit tricky but it does solve your problem.

Here is few reference link
http://forums.asp.net/t/1131274.aspx

ASP.NET AJAX Validators
http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx

ValidatorCallout Demonstration
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ValidatorCallout/ValidatorCallout.aspx

ValidatorCallout BUG
http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=10900


Good luck and happy coding.

Suresh Behera
www.sureshbehra.com

Introduction to Regular Expressions

I think it is a very use full link and just thought to dump it in my blog..

Regular Expressions
Explains the concept of regular expressions.
Early Beginnings
Explains the history of regular expressions.
Uses for Regular Expressions
Illustrates circumstances that would benefit from the use of regular expressions.
Regular Expression Syntax
Demonstrates the elements that comprise the regular expression syntax.
Build a Regular Expression
Explains how you combine elements to produce a regular expression.
Order of Precedence
Lists the operators and the order in which they are evaluated in a regular expression.
Ordinary Characters
Explains the concept of ordinary characters that apply to regular expressions.
Special Characters
Explains the concept of special characters that apply to regular expressions.
Non-Printable Characters
Lists the non-printing characters that apply to regular expressions.
Character Matching
Explains how special characters match printing or non-printing characters in regular expressions.
Quantifiers
Lists the quantifier characters and explains how to use them in regular expressions.
Anchors
Explains the concept of anchors which allow you to fix a regular expression to either the beginning or end of a line.
Alternation and Grouping
Explains how to use the '|' character for choices between to alternatives and how grouping effect the outcome of expressions.
Backreferences
Provides information about how you can store part of a matched pattern for later use.

Thanks,

 

Suresh Behera
www.sureshbehera.com

 

The quick brown fox jumps over the lazy dog

I was having impression that the subject line was a simple funny word.
well it is not.It is a phrase that uses all the letters of the alphabet.

http://en.wikipedia.org/wiki/The_quick_brown_fox_jumps_over_the_lazy_dog

How to insert sample text into a document in Word
http://support.microsoft.com/kb/212251

http://www.thequickbrownfoxjumpsoveralazydog.com/

http://blogs.msdn.com/michkap/archive/2007/03/18/1909475.aspx

Have a fun...

Suresh Behera

 

 

Merge or split cells or cell contents IN EXCEL 2003

I wanted to merge two cell in excel 2003.Question is how ? This sounds like very simple things for professional user and but it took me a hour to figure out the solution. ere is what i did

1. I tryed few left click ,right click and search few buttons on excel tool bar and did not fond anything...Now it is time to search Microsoft Office site this is what i found

 

Merge or split cells or cell contents

OK very good i followed the steps and try to merge two cell....wait a minute where is "Merge and Center" button and where is "formatting" menu on tool bar.Somehow i guess it is pointing to "Format" menu on Tool but somehow i could not found it...

Did i missed something..Don't know ..Yes,your right eve i try the note section also but no hope..

image

 

Then i thought it is for excel 2007 i went and check the help targeted version of excel ...no it is for excel 2003

 

image

 

I have no clue which excel 2003  file is pointing this help article but definitely it sounds like something is missing here.I use excel 2003 but did not found useful to me.

Here is what i found to merge two cells

Select two cell >>right click on it ..? click on format cells

image

 

then click on alignment tab ..? "Merge Cell" and then click  ok

 

image

 

I am using excel professional 2003 edition

image

 

if somebody has any idea please feel free to post comment here.

 

Thanks,

 

Suresh Behera

Posted: Jan 17 2008, 02:38 PM by Suresh Behera | with 2 comment(s) |
Filed under: ,
SQL Server Interview Questions and Answers

Awsome list of SQL Server Inteview Question by Pinal Dave...Hats off pinal.

Download SQL Server Interview Questions and Answers Complete List

Complete Series of SQL Server Interview Questions and Answers
SQL Server Interview Questions and Answers - Introduction
SQL Server Interview Questions and Answers - Part 1
SQL Server Interview Questions and Answers - Part 2
SQL Server Interview Questions and Answers - Part 3
SQL Server Interview Questions and Answers - Part 4
SQL Server Interview Questions and Answers - Part 5
SQL Server Interview Questions and Answers - Part 6
SQL Server Interview Questions and Answers Complete List Download


Other popular Series

SQL SERVER Database Coding Standards and Guidelines Complete List Download
SQL SERVER - Data Warehousing Interview Questions and Answers Complete List Download
DBA Database SQL Job List Search

 I see his blog has 164 list of thank you from various people...He did a great job and very impressive.

Thanks,

Suresh Behera
www.sureshbehera.com

 

DataTable filter on DateTime coloum

I was surprise to know that 'DateTime.Parse' does not parse fractions of a second and this was messing up our Dataview filter.Here is nice tips from furum.

The Select expression you are using uses DateTime.Parse internally.

DateTime.Parse does not parse fractions of a second, even if you were to include them in your expression. 

I can't see DateTime.Parse ever being changed for backwards compatibility reasons.  You basically have two solutions.

1. Truncate the DateTime to an exact second before inserting in your DataTable, e.g.:



locTimeVariable = TruncateToSecond(System.DateTime.Now.AddDays(i));

 

There are a number of ways you could implement the "TruncateToSecond" helper method.  Here are two - you might like to test to see which is fastest:



static DateTime TruncateToSecond(DateTime dateTime)
{
    return new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, dateTime.Hour, dateTime.Minute, dateTime.Second, dateTime.Kind);
}

 

static DateTime TruncateToSecond(DateTime dateTime)
{
   
return new DateTime((dateTime.Ticks / TimeSpan.TicksPerSecond) * TimeSpan.TicksPerSecond, dateTime.Kind );
}

 

2. Alternatively you could specify a range of times from N to N + 1 second, for example:



"MyColumn>=#" + locTimeVariable.ToString(DateTimeFormatInfo.InvariantInfo) +
"# AND MyColumn<" + locTimeVariable.AddSeconds(1).ToString(DateTimeFormatInfo.InvariantInfo) + "#";

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=356919&SiteID=1

Thanks,

Suresh Behera
 

 

HTML tables sorting

Cool javascript code for HTML cliend side sorting

http://www.mingyi.org/other/ts_demo.html#author  - This work great..Mingyi did a great job
http://www.grainge.org/pages/authoring/tables/sorting_mingyi.org/sortrows.htm
http://www.kryogenix.org/code/browser/sorttable/#totalsrows

Sorting HTML Tables using Javascript
http://www.codeproject.com/KB/scripting/sorttable.aspx?df=100&forumid=2945&exp=0&select=578716

Have a fun..

Thanks,

Suresh Behera
www.sureshbehera.com

 

 

 

Posted: Dec 14 2007, 10:20 AM by Suresh Behera | with 2 comment(s) |
Filed under: , ,
AJAX Activity Indicators

There is cool AJAX activity indicator...Check it out..

 http://www.napyfab.com/ajax-indicators/

 Thanks,

Suresh Behera
www.sureshbehera.com

Posted: Dec 10 2007, 10:43 AM by Suresh Behera | with 4 comment(s) |
Filed under: ,
Option Strict On disallows late binding from Visual Studio 2005

If you get this surprise error after converting the asp.net project.
This is what you need to do

 Original
<%# Container.DataItem("ID"
) %>

Change to
CType(Container.DataItem, DataRowView)("ID"
).ToString

This solve your problem.

To set Option Strict in the integrated development environment (IDE)
On the Tools menu, choose Options.

Open the Projects and Solutions node.

Choose VB Defaults.

Modify the Option Strict setting.

To set Option Strict on the command line
Include the /optionstrict compiler option in the vbc command.

 

 

Suresh Behera

Posted: Nov 21 2007, 04:10 PM by Suresh Behera | with 4 comment(s) |
Filed under: ,
Web service VS non-serviced .NET component

I was reading a document on web service and came a very good point on when to use web service and when not.
If you have something in your mind please feel free to put comment here...

Use Web Services:
o    Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.
o    Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.
o    Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.
o    Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.
o    When not to use Web Services: Single machine Applicatons When the apps are running on the same machine and need to communicate with each other use a native API. You also have the options of using component technologies such as COM or .NET Componets as there is very little overhead.
o    Homogeneous Applications on a LAN If you have Win32 or Winforms apps that want to communicate to their server counterpart. It is much more efficient to use DCOM in the case of Win32 apps and .NET Remoting in the case of .NET Apps.

http://www.techinterviews.com/index.php?p=5&more=1&c=1

This is sounds very interesting.

Always have a fun

Suresh Behera

More Posts Next page »