ASP.NET

ReportViewer Control and ASP.NET

I read somewhere that you could embed SSRS in a .NET web page and the other day I thought this would be a good way to add few gauges. To start with, I created a new Report Server Project using Visual Studio 2008 BIDS.  After adding a data source and a simple dataset, I dragged three [...]



AsyncFileUpload file filter

The AsyncFileUpload control (part of the AjaxControlToolkit) does not expose a method that enables you to limit or filter the types of files that can be uploaded. You could add logic to the server side event UploadedComplete to check the file extension prior to saving the file but you would need to upload the file [...]



Maintaining scroll position on postbacks.

Whenever I create web pages with areas of scrollable content I want to ensure the current scroll position is maintained when a postback occurs (regardless if it is a full or partial postback). As per the screen shot below, I have created a simple web page containing a div with the style attribute overflow:scroll.  The button [...]



Dynamic Forms in ASP.NET Part 3

In the first post in this series I looked at the database tables and procedures, in the second the classes that make up the question controls.  In this final part I will build the Survey class and show how to use it on a web page. Link to Part 1  Link to Part 2 You will recall [...]



Dynamic Forms in ASP.NET Part 2

In a previous post I started looking at a sample application that could dynamically create forms in ASP.NET and then store the user input into a database. In this post I am going to continue by looking at the classes used to generate the web controls. As I mentioned in the first post I took [...]



SQL Filestream with ASP.NET

I inherited an asp.net application that stores documents as binary large objects in SQL Server.  I wanted to change the application to use SQL Filestream when storing and retrieving documents. I didn’t want to make major changes to the application and so used the following method to implement FileStream with the least effort. Before using FileStream [...]



Using Linq to process XML from ADOBE Captivate

The training department asked me to build an interface that would accept data from their online courses save it into a database and then allow them to run reports against the data. At first it sounded easy enough, the program they were using was Adobe Captivate and each course can be configured to post data [...]



IScriptControl

A friend of mine was trying to create a control that would limit the amount of text that could be typed into a asp:TextBox with multiline set to true.  I have done something similar years ago, a composite control with a textarea and a label that indicated how many characters remained before the textbox was full.  I [...]



Content Panels & Update Triggers

An update panel trigger allows an asynchronous event be to raised from outside of the update panels content template. <asp:UpdatePanel runat=”server” id=”up1″> <ContentTemplate> <asp:Literal id=”ltTest” runat=”server”/> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID=”btnTest” EventName=”Click”/> </Triggers> </asp:UpdatePanel> <asp:Button runat=”server” id=”btnTest” Text=”Go” OnClick=”btnTest_Click”/> When using master pages and the update panel and trigger control are within different content areas the [...]



XslCompiledTransform

Using the XslCompliledTransform class is pretty straight forward.  First I need an XML file. <?xml version=”1.0″?> <Books> <Book> <Name>Linux Programming</Name> <Author>Warren W. Gay</Author> </Book> <Book> <Name>Adobe Photoshop CS4 for Photographers</Name> <Author>Martin Evening</Author> </Book> <Book> <Name>Beautiful Code</Name> <Author>Oram &amp; Wilson</Author> </Book> <Book> <Name>iPhone 3 Development</Name> <Author>Mark LeMarche</Author> </Book> </Books> Next I create an Xsl transformation file.  Its only [...]