Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp.net updatepanel  update sqldatasource

Posted on 2008-10-01
3
Medium Priority
?
585 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
David Robitaille earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Loops Section Overview
Suggested Courses

597 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