When I started programming I would scour the internet for good examples of code, You usually end up writing most yourself. I began programming <html> in 1999 and used notepad until I found out about Dreamweaver and Visual Studio and then I went crazy making sites. This article will teach the advanced and Intermediate users the great WYSIWYG of the Dreamweaver environment and the power of MX and .Net with a little homemade code to make it all come together for Complex ASP.Net Datagrid ASC/DESC sorting and paging.
Complex Sorting and Paging
with ASP.Net and Dreamweaver MX
You should be familiar with:
1. Dreamweaver Ultradev or MX environment (creating files,panels etc..)
2. SQL Server or Access Database available
3. Can read ASP, VB, or C type language
You should have:
1. A site setup for ASP.Net (C#.NET for C users, and VB.NET or ASP users) in Dreamweaver MX
2. Create a new file called sort.aspx
Create the Database Connection
The Northwind Database (comes installed with ms access and ms sql server). If the "Application" panel is not on the screen then on the menu bar go to: "Window" then click "database". The "Application" panel will be visible. On the "Application" panel click the "+" sign. You will see two options: OLE DB Connection and SQL Server Connection. Since we will be connecting to the local sql server click "SQL Server Connection". If you do not have sql server click "OLE DB Connection" you can still do the example with Access. The only difference will be the connection properties in the page and the connection string.
Now the Connection Box will be visible:
Type in the following connection string:
If you are on a secure network then type your computers workstationid (computers name) at the end of the string:
Also, when you setup sql server if you supplied a username and password then include them in the connection string.
Now click the "Test" button. You should get this box confirming the connection.
Note: you cannot go on if this box does not come up. If you get an error message something is wrong with the connection string.
Now in the application panel the Northwind database will be visible and ready to start using in the MX environment: