Solved

asp.net updatepanel  update sqldatasource

Posted on 2008-10-01
3
567 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
ID: 22617378
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
ID: 22742887
So, did that work?
0
 
LVL 9

Author Closing Comment

by:JonMny
ID: 31502097
That worked
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

860 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