Solved

asp.net updatepanel  update sqldatasource

Posted on 2008-10-01
3
535 Views
Last Modified: 2012-06-27
I have  a grid in an updatepanel that is bound to a sql datasource.

The sql datasource uses a stored procedure and I have the parameter value coming from a text field.

when the user clicks on a button I want to have the sql data source to update

How do I do this




<asp:SqlDataSource ID="SqlDataSource1" runat="server" 

        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 

        SelectCommand="usp_Admin_GetAll" 

        SelectCommandType="StoredProcedure" 

        ProviderName="<%$ ConnectionStrings:on.ProviderName %>">

        <SelectParameters>

            <asp:FormParameter DefaultValue="%" FormField="txtSearch" Name="txt" 

                Type="String" />

        </SelectParameters>

    </asp:SqlDataSource>

Open in new window

0
Comment
Question by:JonMny
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
David Robitaille earned 500 total points
Comment Utility
it<s the grid the should be in the update panel.
click event of the button, do a grid.DataBind(), that will update the data source.
0
 
LVL 18

Expert Comment

by:David Robitaille
Comment Utility
So, did that work?
0
 
LVL 9

Author Closing Comment

by:JonMny
Comment Utility
That worked
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now