Log Button Clicks?

Discussion in 'ASP .Net' started by S. Justin Gengo, Sep 23, 2005.

  1. I'm thinking of building a component that, when dropped onto a .aspx page,
    will intercept all form post back button clicks (maybe even all postback
    events triggered by a .net control) using the bubble event and writing to
    the website log in order to record the event. I did a little bit of
    searching and didn't find that anyone has built anything like this yet. But
    maybe I'm using the wrong search words? Does anyone know of a component that
    logs post-back event clicks of a .aspx page to the log in a way that common
    log analyzers will then be able to interpret them as link clicks?

    If not, does anyone know if I'll run into any file locking problems if I try
    to write directly to the weblogs of a site. Otherwise I could always write
    to a database or an xml file. But I was hoping to write the information in a
    way that is already standardized.

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
     
    S. Justin Gengo, Sep 23, 2005
    #1
    1. Advertising

  2. S. Justin Gengo

    vMike Guest

    "S. Justin Gengo" <sjgengo@[no_spam_please]aboutfortunate.com> wrote in
    message news:%...
    > I'm thinking of building a component that, when dropped onto a .aspx page,
    > will intercept all form post back button clicks (maybe even all postback
    > events triggered by a .net control) using the bubble event and writing to
    > the website log in order to record the event. I did a little bit of
    > searching and didn't find that anyone has built anything like this yet.
    > But maybe I'm using the wrong search words? Does anyone know of a
    > component that logs post-back event clicks of a .aspx page to the log in a
    > way that common log analyzers will then be able to interpret them as link
    > clicks?
    >
    > If not, does anyone know if I'll run into any file locking problems if I
    > try to write directly to the weblogs of a site. Otherwise I could always
    > write to a database or an xml file. But I was hoping to write the
    > information in a way that is already standardized.
    >
    > --
    > Sincerely,
    >
    > S. Justin Gengo, MCP
    > Web Developer / Programmer
    >
    > www.aboutfortunate.com
    >
    > "Out of chaos comes order."
    > Nietzsche

    Every request for any web page goes through the global.asax file and fires
    the Application_EndRequest event. In that event you could write to a log any
    information about the request that is available, such as Reqeust
    information, Form and Query variables and all control values. I use this
    method to write to my own event log. My log is in the form of a simple txt
    file using a filestream and streamwriter, but you could write to a database
    file also. You can also use Application_Error to write errors to an error
    log. In my case, I do not have access to the server logs as I am on a shared
    server and they do not give me access to it. Hope this helps.
    Mike
     
    vMike, Sep 23, 2005
    #2
    1. Advertising

  3. Mike,

    Thanks! Now I just have to determine if my writing to the log file is going
    to interfere with IIS writing to the logs. I'm hoping that IIS checks for
    access, locks, writes, releases. And that if I do the same I can write to
    the log myself. Then I won't have to write any custom reporting. And my
    component will be standards compliant.

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
    "vMike" <> wrote in message
    news:Os%Ye.282$...
    >
    > "S. Justin Gengo" <sjgengo@[no_spam_please]aboutfortunate.com> wrote in
    > message news:%...
    >> I'm thinking of building a component that, when dropped onto a .aspx
    >> page, will intercept all form post back button clicks (maybe even all
    >> postback events triggered by a .net control) using the bubble event and
    >> writing to the website log in order to record the event. I did a little
    >> bit of searching and didn't find that anyone has built anything like this
    >> yet. But maybe I'm using the wrong search words? Does anyone know of a
    >> component that logs post-back event clicks of a .aspx page to the log in
    >> a way that common log analyzers will then be able to interpret them as
    >> link clicks?
    >>
    >> If not, does anyone know if I'll run into any file locking problems if I
    >> try to write directly to the weblogs of a site. Otherwise I could always
    >> write to a database or an xml file. But I was hoping to write the
    >> information in a way that is already standardized.
    >>
    >> --
    >> Sincerely,
    >>
    >> S. Justin Gengo, MCP
    >> Web Developer / Programmer
    >>
    >> www.aboutfortunate.com
    >>
    >> "Out of chaos comes order."
    >> Nietzsche

    > Every request for any web page goes through the global.asax file and fires
    > the Application_EndRequest event. In that event you could write to a log
    > any information about the request that is available, such as Reqeust
    > information, Form and Query variables and all control values. I use this
    > method to write to my own event log. My log is in the form of a simple txt
    > file using a filestream and streamwriter, but you could write to a
    > database file also. You can also use Application_Error to write errors to
    > an error log. In my case, I do not have access to the server logs as I am
    > on a shared server and they do not give me access to it. Hope this helps.
    > Mike
    >
     
    S. Justin Gengo, Sep 24, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Smith Jr.

    Problem with missing button clicks

    John Smith Jr., Dec 12, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    383
    John Smith Jr.
    Dec 14, 2003
  2. Paul Hodgson
    Replies:
    3
    Views:
    521
  3. Klaus Jensen
    Replies:
    1
    Views:
    365
    Klaus Jensen
    Apr 26, 2005
  4. Bucky
    Replies:
    1
    Views:
    13,817
    Bucky
    May 19, 2005
  5. PontiMax

    Clicks and double-clicks

    PontiMax, Jul 14, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    186
    Eliyahu Goldin
    Jul 14, 2004
Loading...

Share This Page