Gridview based on Membership class

Posted on 2009-02-15
Last Modified: 2013-12-17
Hi, I've got a gridview that deletes the users in the Membership class.  I'm trying to set it up so that the gridview refreshes and removes the user after the delete button is hit.  Does anybody know how to perform this? Thanks
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)




            string str = this.GridView1.Rows[e.RowIndex].Cells[0].Text;

            //Deleting files associated with user

            ////string sql = "Delete from UserofFile where FileUser = " + "'" + str + "'";






        catch (ArgumentOutOfRangeException ex)


            statuslbl.Text = ex.Message;



Open in new window

Question by:JeffEae
    1 Comment
    LVL 19

    Accepted Solution

    On line 11 just call the code again which loads the GridView.
    Maybe you have a method - LoadGridView() ?
    Or just a couple of lines of code:
    MyGridView.DataSource = GetMembers();
    Something like that should work.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    User art_snob ( 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.…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 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

    16 Experts available now in Live!

    Get 1:1 Help Now