Jump to content


ASP.net and SQL


1 reply to this topic

#1 l3lueMage

    Wanna Be Moderator

  • Publishing Betazoids
  • PipPipPipPip
  • 4,596 posts
  • Gender:Male
  • Location:San Francisco Bay Area

Posted 22 May 2006 - 04:28 PM

Does anyone here know ASP.net and SQL? I have been trying to get this thing to show the table when the query in the URL matches...but I cant seem to get it to work o_O

 <div>
		<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
			EmptyDataText="There are no data records to display.">
		</asp:GridView>
		<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:userConnectionString1 %>"
			ProviderName="<%$ ConnectionStrings:userConnectionString1.ProviderName %>" SelectCommand="SELECT DISTINCT [UserName], [AgeUser], [EmailUser] FROM [userData] WHERE ([AgeUser] = @AgeUser)">
			<SelectParameters>
				<asp:QueryStringParameter Name="AgeUser" QueryStringField="AgeUser" Type="Int32" />
			</SelectParameters>
		</asp:SqlDataSource>
	
	</div>


#2 l3lueMage

    Wanna Be Moderator

  • Publishing Betazoids
  • PipPipPipPip
  • 4,596 posts
  • Gender:Male
  • Location:San Francisco Bay Area

Posted 22 May 2006 - 05:38 PM

ah nevermind the AutoGenerateColumns="False" has to be true XDDD





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users