|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VWD2005: SQLCommand can't be added to page, why?Hello,
in Visual Studio 2005/Visual Web Developer, if I add SQLCommand, SQLCommandBuilder,SQLConnection, SQLDataAdapter to the toolbox, they don't show up until I check "show all items"; then they appear disabled, and can't be added to the page. Still, I see that I can create those objects programmatically. Why I can't use visual constructor? Is there some other way that is more preferred in VS2005? thanks Hi
The objects you mention have been superceded by the SQLDataSource control and is specially designed for Web Applications. Unlike the previous objects this new control is declared in the .ASPX source file using the tag <asp:SqlDataSource ...> It is displayed in the Design window as a grey box where you can configure with the aid of a Wizard. The data controls in the namespace System.Data.SqlClient are still available for use by WIndows Forms (in visual drag ad drop mode) or Web applications (programmatic ony). In fact if you need to do data operations in code in a Web application then these objects have to be used rather the the new web datasources mentioned above which are designed purely for attachment to visual controls. HTH Show quoteHide quote On 23 Oct, 18:36, "Vadim Rapp" <nos***@sbcglobal.net> wrote: > Hello, > > in Visual Studio 2005/Visual Web Developer, if I add SQLCommand, > SQLCommandBuilder,SQLConnection, SQLDataAdapter to the toolbox, they don't > show up until I check "show all items"; then they appear disabled, and can't > be added to the page. Still, I see that I can create those objects > programmatically. Why I can't use visual constructor? Is there some other > way that is more preferred in VS2005? > > thanks
PostBackTrigger for Ajax cannot find FormView Button
BulletedList Control unhandled exception in custom web control (PS:PSGridView) Position of a dynamic table DropDownList in a GridView How to make to RadioButtonList on the same group Refresh Page Editing/Deleting/Inserting Records using ASPxGridView Re : GridView Error Display a Web Form then Do Something |
|||||||||||||||||||||||