Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 755441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:07:49+00:00 2026-05-14T15:07:49+00:00

I have a fairly simple form: <asp:FormView> <EditItemTemplate> <asp:LoginView> <RoleGroups> <asp:RoleGroup roles=Blah> <ContentTemplate> <!–

  • 0

I have a fairly simple form:

<asp:FormView>
    <EditItemTemplate>
        <asp:LoginView>
            <RoleGroups>
                <asp:RoleGroup roles="Blah">
                    <ContentTemplate>
                        <!-- Databound Controls using Bind/Eval -->
                    </ContentTemplate>
                </asp:RoleGroup>
            </RoleGroups>
        </asp:LoginView>

        <!-- Databound Controls -->
    </EditItemTemplate>
</asp:FormView>

<asp:LinqDataSource OnUpdating="MyDataSource_Updating" />

I handle my LinqDataSource OnUpdating event and do some work handling some M:N fields. That all works.

However, once the update is finished (and I call e.Cancel = true), the LoginView control does not databind its children… so they are all blank. The FormView’s viewstate is still fine, as all the rest of the controls outside of the LoginView appear fine. I even handle the FormView_DataBound event and a Trace shows that the FormView is being databound on postback.

Why then is the LoginView not keeping its ViewState/being databound? Here’s a sample code snippet showing the flow:

protected void MyDataSource_Updating(object s, LinqDataSourceUpdateEventArgs e)
{
    try 
    {
        Controller.DoSomething(newData);
        // attempts to databind again here fail
        // frmView.DataBind();
        // MyDataSource.DataBind();
        // LoginView.DataBind();
    }
    catch { // blah }
    finally 
    { 
        e.Cancel = true; 
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:07:50+00:00Added an answer on May 14, 2026 at 3:07 pm

    I fixed this by reverting to the age old method of databinding everything myself and axing the LoginView.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly simple web2py form with a few validators like, IS_FLOAT_IN_RANGE(...) on
I have a fairly simple data audit web application written with ASP MVC which
I have a fairly simple order creation form on a back office app I'm
I have a fairly simple script designed to hide/unhide various form fields based on
I have a fairly simple website where users can fill out a form describing
I have what should be a fairly simple ASP.NET question, and one I thought
I have this fairly simple form: <form action=...> <div> <input type=text class=input-text value= name=text
I have a fairly simple form with a checkbox, and I noticed that my
I have a fairly simple Rails remote form in HAML in a partial under
Hopefully this is simple. I have a fairly simple ASP.NET (framework version 2) app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.