Let’s hookup with ASP.NET Webhooks Preview


Webhook – A simple HTTP POST based pub/sub mechanism between web applications or services. This is a very effective that most of the modern web applications use this in order to handle event based pub/sub. ASP.NET WebHooks is a framework which is in the preview release; this eases the task of incorporating webhooks in ASP.NET... Continue Reading →

Advertisements

The requested content appears to be script and will not be served by the static file handler.


If you get the above message from IIS while working with ASP.NET 4.5 or above, the most likely cause is that you’re missing the ASP.NET 4.5 in your development IIS. Here’s the resolution To install or uninstall ASP.NET 4.5 on Windows 8 or Windows Server 2012, use one of the following options: Run the following... Continue Reading →

HTTP Headers


This is a quick and a small post on reading the HTTP headers in ASP.NET. Code gets the HTTP header key – value pairs and write it to a text file. 1: protected void Page_Load(object sender, EventArgs e) 2: { 3: var headers = Request.Headers; 4: StreamWriter writer = new StreamWriter(Server.MapPath("~/data.txt")); 5:  6: foreach (var... Continue Reading →

UI Updates – Part 2


ASP.NET ASP.NET UI updates are handles using Ajax. In this example it is described how to use the ASP.NET Ajax for the updates. In ASP.NET Ajax we can have update panel and make the updates via Ajax calls. Prepare your ASPX markup like below. 1: <body> 2: <form id="form1" runat="server"> 3: <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 4:... Continue Reading →

Put watermarks on uploaded images–ASP.NET


Here’s the simples piece of code in C# which can write some text on an image, eventually making it as a watermark. StreamReader reader = new StreamReader(Server.MapPath("sample.jpg")); Bitmap bi = new Bitmap(reader.BaseStream); // base image Graphics gr = Graphics.FromImage(bi); string customString = "your string goes here"; gr.DrawString(s, new Font("Cooper Black", 25), Brushes.ForestGreen, new PointF(140, 115));... Continue Reading →

Charting with DotNet HighCharts


This post explains how to use the DotNet HighCharts wrapper for the HighCharts Javascript library. You can download the wrapper from Codeplex. First create an ASP,NET file and add the following Javascript references. 1: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> 1:  2: <script src="http://code.highcharts.com/highcharts.js"> 1: </script> 2: <script src="http://code.highcharts.com/modules/exporting.js"></script> Download the wrapper and add the single .dll reference... Continue Reading →

Page.FindControl(string id)


  Hi, if you have searched for the problem, Page.FindControl(string id) raises a NullException in ASP.NET then you came to the right place. The answer is simple try the following… Control c = this.Page.Master.FindControl(“ContentPlaceHolderID”); c.FindControl(“The ID of the control you search for”);   Read the below link for the detailed information http://forums.asp.net/t/1000865.aspx/1

Powered by WordPress.com.

Up ↑

%d bloggers like this: