Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Set SqlDataSource in code behind

Reply
Thread Tools

Set SqlDataSource in code behind

 
 
staeri@gmail.com
Guest
Posts: n/a
 
      01-11-2006
Hello!

I would like to set the SqlDataSource in the code behind file and not
to have it in the aspx file. How can I do that?

Regards,

Staeri

 
Reply With Quote
 
 
 
 
Christopher Reed
Guest
Posts: n/a
 
      01-12-2006
Instantiate a SqlDataSource object in your code, probably in your
code-behind.

SqlDataSource sdsData = new SqlDataSource();

There are two other constructors for SqlDataSource. Look at the MSDN
documentation for more information.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hello!
>
> I would like to set the SqlDataSource in the code behind file and not
> to have it in the aspx file. How can I do that?
>
> Regards,
>
> Staeri
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign SelectedValue to DropDownList from code-behind file using SqlDataSource Swetha ASP .Net 16 01-07-2009 02:41 AM
Non-code behind to code behind John ASP .Net 2 02-19-2007 07:08 PM
modify SqlDataSource parameters in code behind? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 2 04-04-2006 02:47 PM
Gridview and SqlDatasource from code behind =?Utf-8?B?RG9ydGU=?= ASP .Net 3 03-30-2006 01:28 PM
Re: Code Behind vs. no code behind: error Ben Miller [msft] ASP .Net 1 06-28-2003 01:46 AM



Advertisments