|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SqlDataAdapterI am trying to implement the solution from the Walkthrough: Updating Data Using a Database Update Query in Web Forms In the walkthrough we are requested to drag a SqlConnection object onto the page from the Data tab of the Toolbox. I don't see SqlConnection object in my Toolbox Data tab. I right clicked the Data tab and selected "Choose Items", then clicked on the SqlCommand, SqlConnection and SqlDataAdapter, then OK, however I still do not see these objects in my Toolbox. I then added the following statement to my MasterPage, but still no help. <%@ Import Namespace="System.Data.SqlClient" %> Note, I am using a Master page and trying this walkthrough app on the Contents page. Can you please tell me how I can have these tools displayed in my toolbox? I am using .Net 2.0, SQL 2005 -- Thanks Morris Hi Morris,
This is a known issue due to a redesign. http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac kID=104995 To use the SqlConnection class we don't have to show it in the Toolbar. We can write code in the code behind directly. You can refer to the following documentation to know how to write code: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection. aspx BTW, in ASP.NET 2.0, using DataSource control is a recommended way. You can follow the quickstart to learn how to use them. http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/default.asp x If you need further assistance please feel free to ask. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msd***@microsoft.com. ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications. Note: MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 2 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Thanks for your quick reply.
I will look at the example for the code behind. I do normally use DataSource control for gridview, detailview, etc. However I want to perform a database action based on a button_click event and don't know how to use a datasource control for the click event. Is there a way to use a datasource for the click event? -- Show quoteHide quoteThanks Morris ""Steven Cheng"" wrote: > Hi Morris, > > This is a known issue due to a redesign. > > http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac > kID=104995 > > To use the SqlConnection class we don't have to show it in the Toolbar. We > can write code in the code behind directly. You can refer to the following > documentation to know how to write code: > > http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection. > aspx > > BTW, in ASP.NET 2.0, using DataSource control is a recommended way. You can > follow the quickstart to learn how to use them. > > http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/default.asp > x > > If you need further assistance please feel free to ask. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > Delighting our customers is our #1 priority. We welcome your comments and > suggestions about how we can improve the support we provide to you. Please > feel free to let my manager know what you think of the level of service > provided. You can send feedback directly to my manager at: > msd***@microsoft.com. > > ================================================== > Get notification to my posts through email? Please refer to > http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications. > > Note: MSDN Managed Newsgroup support offering is for non-urgent issues > where an initial response from the community or a Microsoft Support > Engineer within 2 business day is acceptable. Please note that each follow > up response may take approximately 2 business days as the support > professional working with you may need further investigation to reach the > most efficient resolution. The offering is not appropriate for situations > that require urgent, real-time or phone-based interactions. Issues of this > nature are best handled working with a dedicated Microsoft Support Engineer > by contacting Microsoft Customer Support Services (CSS) at > http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx > ================================================== > This posting is provided "AS IS" with no warranties, and confers no rights. > Hi Morris,
The SqlDataSource control has some methods that can help to query database. We can call them to select, update, insert and delete records. Please check out the following documentations to learn how to use these methods: Select: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasou rce.select.aspx Update: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasou rce.update.aspx Insert: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasou rce.insert.aspx Delete: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasou rce.delete.aspx If you have further questions please feel free to ask. Regards, Allen Chen Microsoft Online Community Support Hi Morris,
Have you got the expected answer? Regards, Allen Chen Microsoft Online Community Support Hi Morris,
Have you got the expected answer? Regards, Allen Chen Microsoft Online Community Support Yes thank you.
-- Show quoteHide quoteThanks Morris "Allen Chen [MSFT]" wrote: > Hi Morris, > > Have you got the expected answer? > > Regards, > Allen Chen > Microsoft Online Community Support > >
importing from excel to gridview
Edit XML object on web page Button Control radiobutton click and avoid page refresh asp:dropdown list width asp button always rendered as type="button" vs. type="submit" Multiple controls with the same ID Repeating content in master pages asp:ImageButton and onClientClick and page refresh Data Components |
|||||||||||||||||||||||