Posts

Showing posts from September, 2012

Using Facebook login in ASP.NET application

Image
Using Facebook login in ASP.NET application Step-1: Register site in Facebook: Open http://developers.facebook.com and login with your Facebook credentials after logging in you will get a screen like this: Click on "Build for Websites" link, you will reach to https://developers.facebook.com/docs/guides/web/ , just click on 'Apps' menu Items (the last menu Item from right side), you will reach to https://developers.facebook.com/apps. Click on   button, you will get following screen. Enter the name of your website in place of App Name, rest of the fields are optional so fill them if you require to use them and click on 'Continue' button. you will be asked to fill a captcha screen and then you will get the summary screen like below screenshot (Just masked the AppID). Give the URL of you webs

Convert Unix Time Stamp To System Date Time

Convert Unix Time Stamp To System Date Time Step 1 Copy the function code below and paste in your page.   public string ConvertToUnixTimeStapToDateTime(double timestamp)     {                 // First make a System.DateTime equivalent to the UNIX Epoch.         System.DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);         // Add the number of seconds in UNIX timestamp to be converted.         dateTime = dateTime.AddSeconds(timestamp);         // The dateTime now contains the right date/time so to format the string,         // use the standard formatting methods of the DateTime object.         string resDate = dateTime.ToShortDateString() + " " + dateTime.ToShortTimeString();         return resDate;     } Step 2 Call the function and pass the time span value. Label1.Text=ConvertToUnixTimeStapToDateTime(128988834); Happy Programming....With Programming Heaven

Download Pre-Request patch file for SharePoint 2010 Installation

Download Pre-Request patch file for  SharePoint 2010 Installation Pre-Request patch file download for SharePoint 2010 Software. Click on below link for download pre request file... 1.SQL Native Client 2.Hotfix for Microsoft Windows (KB976462) – NET 3.5 SP1 HotFix or Windows 2008 R2 3.Windows Identity Foundation (KB974405) for Windows 2008 R2 4.Microsoft Sync Framework Runtime v1.0 (x64) 5.Microsoft Chart Controls for Microsoft .NET Framework 3.5 6.Microsoft Filter Pack 2.0 7.Microsoft SQL Server 2008 Analysis Services ADOMD.NET 9.Microsoft Server Speech Recognition Language - TELE(en-US) 10.SQL 2008 R2 Reporting Services SharePoint 2010 Add-in

Convert HtmlToPDF in ASP.net & iTextshrap

Convert Web Page to PDF  in ASP.net & iTextshrap Step 1 Download iTextSharp dll from below link's Download iTextSharp dll iTextsharp_Dll Download Step 2 Create a sample website in .net . Add reference the downloaded dll . Step 3 Create a page  and design you report in this web page and put one button for Export to pdf . Step 4 C# Add namespaces below  . using System.IO; using iTextSharp.text; using iTextSharp.text.html.simpleparser; using iTextSharp.text.pdf; using System.Text; Copy and Paste below code in Export Button click event .  Response.ContentType = "application/pdf";         Response.AddHeader("content-disposition", "attachment;filename=TestPage.pdf");         Response.Cache.SetCacheability(HttpCacheability.NoCache);         StringWriter sw = new StringWriter();         HtmlTextWriter hw = new HtmlTextWriter(sw);         this.Page.RenderControl(hw);         StringReader sr = new StringReader(sw.ToStr

Stock Quote and Chart with yahoo using c#

Stock Quote and Chart with yahoo using c# Step 1 Create a website with visual studio and copy the below code paste in your page code behind . Code    protected void Page_Load(object sender, EventArgs e)         {             if (!IsPostBack)             {                 // The page is being loaded and accessed for the first time.                 // Retrieve user input from the form.                 if (Request.QueryString["s"] == null)                     // Set the default stock symbol to YHOO.                     m_symbol = "STER.NS";                 else                     // Get the user's input.                     m_symbol = Request.QueryString["s"].ToString().ToUpper();                 // Update the textbox value.                 txtSymbol.Value = m_symbol;                 // This DIV that contains text and DIVs that displays stock quotes and chart from Yahoo.                 // Set the innerHTML property to replaces t

Search Linked In People In your web application using linked in Javascript API

Image
Search Linked In People In your web application using linked in Javascript API Step 1 Go to this below URL  https://www.linkedin.com/secure/developer?newapp= Step 2 Add your apps for generate API key .See Figure 1 Figure 1 Step 3 Fill up all required information as per your requirement .See Figure 2 Figure 2 Then click on Add Application Button for generate API Key .See Figure 3 Figure 3 Step 4 Copy the Below Code and paste in your application page . <script type="text/javascript" src="http://platform.linkedin.com/in.js">   api_key: YOUR_API_KEY </script> <script type="text/javascript"> function searchClick() {   if (!IN.ENV.auth.oauth_token) {     alert("You must login w/ LinkedIn to use the Search functionality!");     return;   }   IN.API.PeopleSearch()     .fields("id", "firstName", "lastName")     .params({