The City of knowledge
asp.net
Emulate ASP.NET validation groups with jQuery validation validation
Jan 1st
In WebForms, we have the concept of a ValidationGroup to mitigate the issues that come with wrapping the entire page in a single form element. Whether right or wrong in principle, this scheme does a pretty good job of keeping the ASP.NET Validation controls from getting their wires crossed on More >
Working with GDI+ in ASP.NET
Nov 25th
The best way to start is with an example.
Creating graphics on the fly is not rocket science when using ASP.NET. First thing you need to do is add a using directive in the code-behind file:
using System.Drawing; using System.Drawing.Imaging;Next a new instance of the Bitmap object must be created in the WebForm1 class:
Bitmap Bmp;We’ll start by creating More >
Sending emails with ASP .NET
Nov 25th
I can’t imagine a complete website that hasn’t got a function to email someone, either the user when he registers or the administrator when someone contacts him through the website. No doubt, ASP.NET must have a class that can be used to send emails. Actually, there are two: SmtpMail and MailMessage.
In More >
Skype May Be Shut Down
Nov 25th
eBay, the owner of Skype since the 2005 purchase, has recently announced that due to a licensing disagreement with the founders of Skype, it may have no other option than to shut down the application.
Skype was founded by two Danish entrepreneurs, Niklas Zennstrom and Janus Friis, and purchased by eBay More >
ASP.NET 2.0 Script CallBack (Ajax like)
Nov 25th
Download this ASP.NET 2.0.50215 (BETA) C# project (can easily be converted to VB.NET)
Download this ASP.NET 2.0.50727 C# project (can easily be converted to VB.NET)
You probably already know what Ajax does, or maybe not, but what’s certain is that you heard about Ajax because much fuss is created around it on the web.
In More >
Create an RSS feed using ASP.NET 2.0
Nov 25th
n this tutorial we’re going to create a similar RSS feed, using ASP.NET 2.0.
In the ASP.NET 2.0 project, create a new file which will be the RSS feed. We used “TodaysHeadlines.aspx”.
Now open the markup of the file and replace everything inside it with the following two lines:
Don’t forget to change More >
Connect to Access Database in Visual Studio .NET
Nov 25th
ou can use DataSets or DataReaders to read the information from the database. A DataReader is about twice as fast as a DataSet (according to Sams Publication). This tutorial uses DataReaders to read the data from a Microsoft Access Database in Visual Studio .Net 2003. ASP.NET web application is used More >
Accessing the controls and methods of a MasterPage
Nov 25th
It won’t take you long to use MasterPages and feel the need to call a method or a property of that MasterPage class from inside a web form. The typical instinct is to use Master.MethodName() inside the ASP.NET web form file. Unfortunately that will not work… fortunately there is a an easy fix. More >
Initiate Download Using ASP.NET and VB.NET
Nov 25th
- Private Sub FetchFile(ByVal strFromPath As System.String, ByVal strSendWithName As System.String)
- Dim strServerAbsPath As String
- Dim infFile As System.IO.FileInfo
- ‘ Change the relative path to the absolute path
- strServerAbsPath = Me.Server.MapPath(strFromPath)
- ‘ Will use to check if the file exists
- infFile = New System.IO.FileInfo(strServerAbsPath)
- ‘ If it does…
- If infFile.Exists Then
- With Me.Response
- ‘ Send headers
- .ContentType = “application/octet-stream”
- .AddHeader(“Content-Disposition”, “attachment; filename=” & strSendWithName)
- .AddHeader(“Content-Length”, infFile.Length.ToString)
- ‘ Send the file
- .WriteFile(infFile.FullName)
- ‘ Send and end the response
- .Flush()
- .End()
- End With
- ‘ File does not exist
- Else
- ThrowError(“IO Error”, “File More >
