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 960483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:11:22+00:00 2026-05-16T01:11:22+00:00

I have an asp.net intranet site hosted on IIS on my computer. On one

  • 0

I have an asp.net intranet site hosted on IIS on my computer.

On one page you can enter two user id’s and get a side by side comparison of their roles in our (custom app) system.

I often use it to add roles when I’m setting up new users. After running the query, if i change a role and run the query again it will not show updated results. It’s being cached somehow. I have to go to another page and come back and them run the query to get updated results.

How can avoid having to navigate away to get the updated query results displayed.n


here’s the code

<asp:Label ID="Label1" runat="server" Text="Username"></asp:Label>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <br />
    <asp:Label ID="Label2" runat="server" Text="Username"></asp:Label>
    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" 
        Text="Compare Permissions"  />
    <br /><br />
    <asp:GridView ID="GridView1" runat="server" CssClass="mGrid" DataSourceID="SqlDataSource1">

    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="WITH
firstPerson AS
(
select username, security_role from user_role
where username=upper(:Username1) 
),
secondPerson as
(
select username, security_role from user_role
where username=upper(:UserName2) 
)
select firstPerson.username , firstPerson.security_role,secondPerson.username,secondPerson.security_role from firstPerson FULL JOIN secondPerson
  on firstPerson.security_role=secondPerson.security_role order by firstPerson.security_role, secondPerson.Security_role">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="Username1" 
                PropertyName="Text" />
            <asp:ControlParameter ControlID="TextBox2" Name="UserName2" 
                PropertyName="Text" />
        </SelectParameters>
    </asp:SqlDataSource>
  • 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-16T01:11:22+00:00Added an answer on May 16, 2026 at 1:11 am

    I think the problem is simply that after you add these new values, you are not refreshing your gridview. There aren’t any controls that can “automagically realize” the data has changed. Instead, you need to do it manually, by rebinding your data view control to it’s (new) data with DataBind().

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

Sidebar

Related Questions

Background I have an ASP.NET site, hosted internally on our company's intranet server. The
How can I get two separate ASP.NET sites, in this case a Web Site
I have intranet highly user interactive ASP.net applications, which now I am going to
I have asp.net mvc intranet site that is deployed to IIS6. Site is used
I have an ASP.Net MVC intranet site which uses Windows Authentication to know who
I have an intranet ASP.NET web application in which I need to get the
I have an ASP.net 2.0 intranet site that uses the indexing service on a
I have an ASP.NET 3.5 intranet website which has a default page with a
I have an ASP.NET MVC site that contains a WCF SVC that is hosted
i have an intranet app asp.net mvc site. is there anyway to capture the

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.