|
-
Apr 13th, 2008, 01:00 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] VB Gridview sorting tutorial (I know silly questions)
Hey folks,
Lets start by saying that I am not a programer of any stretch. I am resourceful and not a complete idiot. However, reading from a book does nothing for me.
I have a little website of my own. I have everything there is on it and hope to continue to until it give me money to pay someone else. (Maybe never)
anyway...
I am looking at an ASP.NET quickstart tutorial and have a question. Basically I am wanting to call up some data that I have on a SQL db. This is basic sports stats that I want to be able to sort.
The tutorial has a command that I would like to master and a learning session. Called VB Grid View Sorting
http://quickstarts.asp.net/QuickStar...iewSorting.src
On this link there are two areas of code.
#1) the aspx page GridViewSorting_vb.aspx
#2) Webconfig file.
My question...My webconfig file already has some connection strings in it, how do I get the code in the correct place? Does it matter the order? Also the aspx page only calls for the Pub connection. What are all the others used for in the tutorial? or are they just there to show examples of multimple connections?
Last edited by ggodwin; Apr 15th, 2008 at 07:21 AM.
Reason: [RESOLVED]
-
Apr 13th, 2008, 10:07 PM
#2
Fanatic Member
Re: VB Gridview sorting tutorial (I know silly questions)
I hope this link will help you also you can find more connection string here.
-
Apr 14th, 2008, 06:53 AM
#3
Re: VB Gridview sorting tutorial (I know silly questions)
According to the sample,
ConnectionString="<%$ ConnectionStrings:Pubs %>"
That will get the 'pubs' connectionString information out of the web.config file.
I don't know what you mean by the other databases used in the tutorial, can you show us where they are?
-
Apr 14th, 2008, 08:38 AM
#4
Thread Starter
Hyperactive Member
Re: VB Gridview sorting tutorial (I know silly questions)
Mendhak,
I was looking over this last night. I concluded that all the other strings in the webconfig file are for another tutorial with another use and are not needed for this?
-
Apr 14th, 2008, 09:25 AM
#5
Re: VB Gridview sorting tutorial (I know silly questions)
No, they shouldn't be required for this particular sample. When you run it, if you get errors related to those strings, then you know that the connection strings are being referenced but the mentioned databases don't exist. Which I doubt will happen.
-
Apr 14th, 2008, 11:46 AM
#6
Thread Starter
Hyperactive Member
Re: VB Gridview sorting tutorial (I know silly questions)
Question:
I am looking at the code and wondering where is the database and table call out? My connection take me to a hosted db that has several databases.
In the below code is the the code [authors] a table or a db?
Code:
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand="SELECT [au_id], [au_lname], [au_fname], [phone], [address], [city], [state], [zip], [contract] FROM [authors]"
ConnectionString="<%$ ConnectionStrings:Pubs %>" />
-
Apr 14th, 2008, 11:47 AM
#7
Thread Starter
Hyperactive Member
Re: VB Gridview sorting tutorial (I know silly questions)
OK...on further review.
It appears (i assume) that authors is the table and the db is pubs as called out in the connection string...
confirm?
-
Apr 14th, 2008, 12:54 PM
#8
Thread Starter
Hyperactive Member
Re: VB Gridview sorting tutorial (I know silly questions)
No need to respond here. I got it figured out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|