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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:38:40+00:00 2026-05-14T08:38:40+00:00

I am trying my hands on asp.net+ajax+httpmodule. My Form <form id=LoginForm runat=server> <asp:ScriptManager ID=LoginScriptMgr

  • 0

I am trying my hands on asp.net+ajax+httpmodule.

My Form

<form id="LoginForm" runat="server">
<asp:ScriptManager ID="LoginScriptMgr" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="LoginPanel" runat="server">
    <ContentTemplate>
        <asp:Label ID="lblLoginHeader" Text="Login" runat="server"></asp:Label>
        <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
        <asp:Button ID="btnLogin" Text="Login" runat="server" OnClick="Login" />
        <asp:Label ID="lblLoginStatus" runat="server" />
    </ContentTemplate>
</asp:UpdatePanel>
</form>

C# Code

protected void Login(object sender, EventArgs e)
{
lblLoginStatus.Text = "Login Successful";
}

Web.config

<httpModules>
  <add name="TimeModule" type="MyWebPortal.App_Code.TimeModule,App_Code"/>
</httpModules>

HTTP Module

public class TimeModule : IHttpModule
{
    private HttpApplication oApps = null;
    public void Dispose()
    {
    }
    public void Init(System.Web.HttpApplication context)
    {
        oApps = context;
        context.PreSendRequestContent += new EventHandler
        (context_PreSendRequestContent);
    }
    void context_PreSendRequestContent(object sender, EventArgs e) 
    {
        string message = "&lt;!-- This page is being processed at " + System.DateTime.Now.ToString() + " -->";
        oApps.Context.Response.Output.Write(message);
    }
}

When i remove the TimeModule from Web.config my ajax works. If add the TimeModule then the label doesn’t show the message “Login Successful”.

Removing the ajax panel and with httpmodule available the label shows the message. So, how ajax panel was related to httpmodules?

  • 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-14T08:38:40+00:00Added an answer on May 14, 2026 at 8:38 am

    I think that the problem is that what you are sending in the module interferes with the normal response stream. This stream is structured, i.e. has a header and body.

    Try adding the comment with the PostRequestHandlerExecute. The result should not be 100% correct, but it should not interfere.

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

Sidebar

Related Questions

I am trying my hands on Visual Studio 2010 (Asp.Net 4.0) for the first
I am trying to get my hands on MVC. I am from ASP.Net background.
I am trying to make an ASP.NET MVC 3 app in which I have
I'm starting a new ASP.NET project that I'm trying to use some jQuery with,
i'm using ASP.NET + a MySql Db. I'm trying to configure a ListView so
I am trying to make a simple time-calculating program in ASP.NET where people enter
I am trying to develop a comet page using Asp.net. Surfed a lot and
I am trying to debug my asp.net project in VS 2010 but I don't
I am trying to understand the password recovery technique on asp.net membership. This is
I am trying to deploy a asp.net mvc site. My hosting service provider provides

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.