Please send web services suggestions in the comments for this entry!
UPS Shipping Quotes
UPS Shipping Quotes another one
Understanding Namespaces
Create Versatile Web Services From Stored Procedures
Please send control suggestions in the comments for this entry!
ASP Net Menu
ASP.Net Grid from Infragistics
RSS - Sharp Reader Written in .Net
Please send sample suggestions in the comments for this entry!
A Collection of Datagrid Articles - More extensive than this one!
Creating Master-Detail Listings using ASP.NET controls
Persistant and Bidirectional Sorting In DataGrid
Downloadable DataList samples for beginners
Creating DataGrid Programmatically
Building a Master/Detail DataGrid for Database Inserts
Recalculating Column Values in DataGrid
Display DataGrid in small screen area without using Paging
Creating DataGrid Templated Columns Dynamically - Part I
Creating DataGrid Templated Columns Dynamically - Part II
Displaying Two DataTables In One DatGrid
Displaying Images from SQL Server database in DataGrid
Display Conditional Data In DataGrid Column
Confirming Deletes in ASP.NET DataGrid
Adding Paging Functionality To DataList
Alphabetical Paging in DataGrid
Quickly Adding A New Row In DataGrid
Custom Paging In DataGrid
Sorting Template Columns of ASP.NET DataGrid
Using Radio Buttons To Select DataGrid Row
File Upload Using ASP.Net
Inserting A Record Into a Dataset
Common ASP.NET Code Techniques - Collections, Arrays, Hash Tables etc.
Export Datasets to Excel
Top 10 Questions About the Datagrid Server Control
Windows Forms versus Web Forms DataGrid Controls, Controlling Column Width, Height, and Alignment, Customizing Column Layout in Display and Edit Mode, Formatting Dates, Currency, and Other Data, Showing and Hiding Columns Dynamically, Adding Columns Dynamically, Adding New Records to a Data Source Using the DataGrid Control, Displaying a Drop-Down List in Edit Mode, Selecting Multiple Items Using a Check Box (Hotmail Model),
Editing Multiple Rows At Once, Selecting Rows by Clicking Anywhere
Ask the DotNetJunkies How do I add a DropDownList to a DataGrid EditItemTemplate
File Upload with ASP.Net
Nesting Server Controls
Working with Datagrid Templates
Loop Through a Datagrid (Display Hierarchical Data)
Sticky Table Headers - Stay Put When Scrolling
DataGrid and Checkboxes
db2Connection.ConnectionString = "Provider-MSDASQL.1;Persist Security Info=False;Data Source=DSNAS400DB2;Mode=ReadWrite"
1: Dim objConn As SqlConnection
2: Dim objCmd As SqlCommand
3: Dim dataReader As SqlDataReader
4: Dim strSql As String
5: Dim txtCarrier as String
6: Dim txtFromPort as String
7: Dim txtToPort as String
8: Dim txtContainer as String
9: Dim txtProduct as String
10:
11: Sub Page_Load(Source As Object, E As EventArgs)
12:
13: 'SQL connection.
14: objConn = New SqlConnection("Data Source=xxxxxxx;" _
15: & "Initial Catalog=xxxxxxxx;User Id=sa;Password=xxxxxx;" _
16: & "Connect Timeout=15;Network Library=dbmssocn;")
17:
18: If Not Page.IsPostBack Then
19: LoadCombos
20: End If
21:
22: End Sub
23:
24: Sub LoadCombos()
25:
26: strSql = "SELECT SP_Key, SP_Name FROM tbl_Service_Provider_Codes WHERE SP_Type = 'C' ORDER BY SP_Name;" _
27: & "SELECT tbl_Port_Codes.Port_Key, tbl_Country_Codes.Country_Name + '-' + tbl_Port_Codes.Port_Name as Port FROM tbl_Port_Codes INNER JOIN tbl_Country_Codes ON tbl_Port_Codes.Port_Country_Key = tbl_Country_Codes.Country_Key Where tbl_Port_Codes.Port_Mode = 'O' ORDER BY Port;" _
28: & "SELECT tbl_Port_Codes.Port_Key, tbl_Country_Codes.Country_Name + '-' + tbl_Port_Codes.Port_Name as Port FROM tbl_Port_Codes INNER JOIN tbl_Country_Codes ON tbl_Port_Codes.Port_Country_Key = tbl_Country_Codes.Country_Key Where tbl_Port_Codes.Port_Mode = 'O' ORDER BY Port;" _
29: & "SELECT Product_Key, Product_Name FROM tbl_Product_Codes ORDER BY Product_Name;" _
30: & "SELECT Container_Key, Container_Name FROM tbl_Container_Codes ORDER BY Container_Name;"
31:
32:
33: objCmd = New SqlCommand(strSql, objConn)
34: Try
35: objConn.Open()
36: dataReader = objCmd.ExecuteReader()
37: 'Carriers
38: With ddlCarriers
39: .DataSource = dataReader
40: .DataTextField = "SP_Name"
41: .DataValueField = "SP_Key"
42: .DataBind()
43: End With
44: dataReader.NextResult()
45: 'From PortCodes
46: With ddlFromPorts
47: .DataSource = dataReader
48: .DataTextField = "Port"
49: .DataValueField = "Port_Key"
50: .DataBind()
51: End With
52: 'To PortCodes
53: dataReader.NextResult()
54: With ddlToPorts
55: .DataSource = dataReader
56: .DataTextField = "Port"
57: .DataValueField = "Port_Key"
58: .DataBind()
59: End With
60: 'Products
61: dataReader.NextResult()
62: With ddlProducts
63: .DataSource = dataReader
64: .DataTextField = "Product_Name"
65: .DataValueField = "Product_Key"
66: .DataBind()
67: End With
68: 'Container
69: dataReader.NextResult()
70: With ddlContainers
71: .DataSource = dataReader
72: .DataTextField = "Container_Name"
73: .DataValueField = "Container_Key"
74: .DataBind()
75: End With
76: Catch exc As Exception
77: Response.Write(exc)
78: Finally
79: If Not dataReader Is Nothing Then
80: dataReader.Close()
81: End If
82: objCmd = Nothing
83: If objConn.State = ConnectionState.Open Then
84: objConn.Close()
85: End If
86: objConn.Dispose()
87: End Try
88:
89: End Sub