Posts

CsharpTwitt

The Following link is my developed Library of Twitter APi for C# http://code.google.com/p/csharptwitt/ The Following Link for Discussion on Twitter http://twitter.com/CsharpTwitt The Twitter API document can be found from the following link http://dev.twitter.com/pages/open_source#csharp

Refresh Button Issue

//Following Statement is used to avoid reexecution of Insert, Update, Delete Data to the Database when user press the Refresh button or F5 in browser. Response.Redirect(Request.Url.ToString(), false);

scaffolding

scaffolding is mechanism that enhance the functionality of the existing ASP.NET Framework by adding the ability to dynamically display pages based on the data model of the database. To see the Example Click Here

LINQ Basic

LINQ BASIC I am starting from this mail to show the technical skills to work with LINQ . The following is a very basic LINQ Query Expression Example: string[] strCities = { "Mumbai", "Delhi", "Surat", "Chennai", "Ahemdabad", "Jaipur" }; IEnumerable strResult = from city in strCities select city.ToUpper(); grdLinqBasic.DataSource = strResult; grdLinqBasic.DataBind(); In the above Example I am using the array of string and then using LINQ query expression against the array. I am also applying a string operation in the query itself, which help us to modify the result in the query itself. LINQ queries return results of type: IEnumerable Where is determined by the object type of the “select” clause of the query. In the above sample “city” is string. So the above example have the IEnumerable type is “string”. LINQ is STORNGLY-TYPED It means we can have compile-time c...

To provide file download Facility in ASP.Net

Image
To provide file download facility to use in from the website the following code need to be done in the button click event protected void Button1_Click(object sender, EventArgs e) { string path = Server.MapPath("html-character-entities-cheat-sheet.pdf"); string name = System.IO.Path.GetFileName(path); Response.AppendHeader("content-disposition","attachment; filename=" + name); Response.ContentType = "Application/pdf"; Response.WriteFile(path); Response.End(); }

To Avoid Popup Blocker to open Pop up from website.

The Following code will used to open popup window and the popup blocker will not block it. Code Of The Parent Page of Popup <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPopupBlocker.aspx.cs" Inherits="TestPopupBlocker" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" &gt ; <html xmlns=" http://www.w3.org/1999/xhtml " > <head runat="server"> <title>Untitled Page</title> <script language ="javascript"> function getAjaxXml() { var xml; if(document.all) { //IE xml = new ActiveXObject("Microsoft.XMLHTTP"); } else { //FF,Opera,NN ...

Chanakya's Quotes - Worth reading a million times…

Chanakya's Quotes - Worth reading a million times… *************************************************** 'A person should not be too honest. Straight trees are cut first and Honest people are victimised first.' *************************************************** 'Even if a snake is not poisonous, it should pretend to be venomous.' *************************************************** 'The biggest guru-mantra is: Never share your secrets with anybody. ! It will destroy you.' *************************************************** 'There is some self-interest behind every friendship. There is no Friendship without self-interests. This is a bitter truth.' *************************************************** 'Before you start some work, always ask yourself three questions - Why am I doing it, What the results might be and Will I be successful. Only when you think deeply and find satisfactory answers to these questions, go ahead.' ****************...