With any HttpRequest through our Asp.Net application we can collect a lot information about client's browser.
We can get this information creating an object of the Browser property of the Request .
we can access many properties with this object like: Browser.Type, Browser.N…
Page init event in asp.net
•
Tapovan
Init is actually a event which is available for every individual control on a Asp.Net page. So you can use this event for any of the control on your page or use it for Page as well.
Page_Init event is fired before the Page_Load, We can perform here task related to user authe…
how to pass null value in sql from c#
•
Tapovan
Its a very common scenario when we do not pass any value for a column during db insert it places NULL there for that column. But sometimes situation occurs when we programatically want to insert a NULL for a perticular column in table. And this the way to do this :
Just use DB…
string.split in c#
•
Tapovan
Whenever we have a situation where we have to split a string on the basis of a character, we can use this method.
First of all we have to check if that char(needle) exists in the string. We are doing it with indexOf method that tells about the index of the char(needle) in stri…
How to get last inserted id in sql server
•
Tapovan
SELECT @@IDENTITY
It returns the last IDENTITY value produced on a connection, regardless of the table that produced the value, and regardless of the scope of the statement that produced the value.
@@IDENTITY will return the last identity value entered into a table in your curre…
Date difference in C#
•
Tapovan
We have to create an object of the TimeSpan Class to get difference between two dates or time.
Then use the Subtract method of TimeSpan Class to get the difference.
You can use Days, Hours, Minutes and Seconds property of the TimeSpan Class to get flexible results.
// current…
String IndexOf method c#
•
Tapovan
we use IndexOf simply to see whether the input string contains
a string. We want to see if the string in the example contains "lucky". Program that uses IndexOf [C#]
using System;
class Program
{
static void Main()
{
// A.
// The input string.
const string …
an "open and free" initiative. Powered by Blogger.