Archive for the ‘C#’

Custom Field Validator is one of the best way to validate your page, with different different way like there are so many ways you can use this validator  like validating date, drop down , checkbox and so many .

here is one basic example on how validating date or Birth ( it should not be greater [...]

Cheap trick:

Convert.ToString((object)stringVar) == “”

This works because Convert.ToString(object) returns an empty string if object is null. Convert.ToString(string) returns null if string is null.

(Or, if you’re using .NET 2.0 you could always using String.IsNullOrEmpty.)

In vb6.0 we used the Sleep API function to allow the process to ‘sleep’ for specified time interval. VB.NET comes up with an sleep function on its own

System.Threading.Thread.Sleep(500)

The argument 500 in the above code specified the number of milliseconds for which the thread is blocked.

Specify zero (0) to indicate that this thread should be suspended [...]

Status bars is important part in informing the user of the use of controls, the status of progress of the application and many more .Net provides a new control – the StatusStrip control – an extension of StatusBar

follow the steps to do same:
1.Select the StatusStrip control in the ToolBox and drop it on the form

2.When [...]

JSON

JavaScript Object Notation (JSON) is one of the best of technologies which is used in Asynchronous JavaScript and XML (AJAX).
here are some cool links to Explore JSPN

http://www.developer.com/lang/jscript/article.php/3596836

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

http://dev2dev.bea.com/pub/a/2007/02/introduction-json.html

http://www.json.org/

Hi,

I have seen most of the People where asking about the where i can start in .Net or how i can learn .Net. For them its a really great collection of website or Resource.

hope you like it , but before starting with .Net (C# , ASP.Net ,VB.Net ) or [...]

if u want to minimize / Shrink / Shorten url , then its a very good technique to do this
then its very much useful as per the security and many others aspects.

its very useful for the devloper to create a simple url for there web application / url redirection services like

Most of the time we need to delete duplicate entries from GridView, in this case we can delete it manually also or using onRowcreate also we can remove that .

Example
suppose Mr.Xyz has has more than 2 Account in Blogspot.com site and we want to show
in GridView Person and RelatedBlogs like this [...]

In GridView using “OnRowCreated” function we can add onClick function.

here is the sample code

html code

<asp:TemplateField HeaderText=”Header 3″>
<ItemTemplate>
<asp:Label ID=”Label1″ runat=”server” Text=”Click Me”></asp:Label>
[...]

Detecting Client IP address

To keep track of Visitor’s Record such as IP address and all
then u can use this way ,
it will display the Client proxy ip address , if the client is using Proxy server.

if (Context.Request.ServerVariables["HTTP_VIA"] != null)
{
[...]