Web Developer Friend

Posts Tagged ‘ASP.NET

Add Watermark text on Image

Posted by: viralsarvaiya on: September 18, 2009

step 1. upload the image file
step 2. save the image and get the filename with the full the path where the image file will store.
dim pathname as string
// this “pathname” contains path with filename of the uploaded file with fileupload control.
Dim ImgStamp As New Bitmap(pathname)
Dim g As Graphics = Graphics.FromImage(ImgStamp)
g.SmoothingMode = SmoothingMode.AntiAlias
Dim y As Integer [...]

Sql Transaction Begin, Commit, Rollback Demo in asp.net

Posted by: viralsarvaiya on: September 18, 2009

Some programmer require to rollback and commit the transaction of the sqlserver according to the coding. That time this code will help you….
Imports System
Imports System.Data
Imports System.Data.SqlClient
public class MainClass
Shared Sub Main()
Dim thisConnection As New SqlConnection(“server=(local)\SQLEXPRESS;” & _
“integrated security=sspi;database=MyDatabase”)
‘ SQL Delete Commands
Dim sql As String = “DELETE FROM Employee ” & _
“WHERE ID = 10″
‘ Create command
Dim [...]

Display Hierarchical Data with TreeView in ASP.NET 2.0

Posted by: viralsarvaiya on: August 4, 2009

I’m going to provide a simple example how to display hierarchical data from SQL Server database in the TreeView. A requirement is that the implementation should not be dependant on the hierarchy level in the database. It means that the TreeView implementation should be capable of displaying data from any level, no matter how deep.
Listing [...]

New ASP.NET Charting Control:

Posted by: viralsarvaiya on: July 23, 2009

Microsoft recently released a cool new ASP.NET server control – <asp:chart /> – that can be used for free with ASP.NET 3.5 to enable rich browser-based charting scenarios:

Download the free Microsoft Chart Controls
Download the VS 2008 Tool Support for the Chart Controls
Download the Microsoft Chart Controls Samples
Download the Microsoft Chart Controls Documentation
Visit the Microsoft Chart [...]

Create Zip File Using Dotnet

Posted by: viralsarvaiya on: July 11, 2009

in the dotnet framework there are two method for compressing data
1) GZip
2)Deflate
here i am using GZip Stream (System.IO.Compression).
Steps
1) Create Simple Web Application (asp.net with C#).
2) put below control in to page.
2.1) Button (id=”btnCompress”)
3) put below code in to click event of button.
//create one folder in the project (txt)
//get the folder physical path
string filepath [...]

How To Generate Captcha Image In Asp.net

Posted by: viralsarvaiya on: July 8, 2009

* why Captcha Image Required ?
Restrict User to Auto Registration or Login in the site. General Senario for that if you have a company who create new login or registration for the users. in this situation you never be going registration or login one by one. you create simple file in that file you put [...]

How to Use datatable in asp.net

Posted by: viralsarvaiya on: July 3, 2009

hear i explain the use of the data table
first u have to take a new data table
Dim myDataTable As New DataTable
then take a column
Dim myDataColumn As DataColumn
give the name of the collumns
myDataColumn = New DataColumn()
myDataColumn.DataType = Type.GetType(“System.String”)
myDataColumn.ColumnName = “First column name”
myDataTable.Columns.Add(myDataColumn)
myDataColumn = New DataColumn()
myDataColumn.DataType = Type.GetType(“System.String”)
myDataColumn.ColumnName = “Second column name”
myDataTable.Columns.Add(myDataColumn)
take a row of the datatable
Dim [...]

ASP.NET Validation Controls

Posted by: viralsarvaiya on: March 13, 2009

With ASP.NET, there are six(6) controls included.
They are:
* The RequiredFieldValidation Control
* The CompareValidator Control
* The RangeValidator Control
* The RegularExpressionValidator Control
* The CustomValidator Control

All of the validation controls inherit from the base class BaseValidator so they
all have a series of properties and methods that are common to all validation controls.
They are:
* ControlToValidate – This value is [...]


Blog Stats

  • 5,866 hits