Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. I want to dynamically access particular session of the application [Its urgent]

I want to dynamically access particular session of the application [Its urgent]

Scheduled Pinned Locked Moved ASP.NET
24 Posts 6 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dev S

    Hi, First point is this how you are going to notify the user who is already watching the deal(until he refreshes the page). So its better lock it while it is viewed by other and for this create a log in ur db in synchronisation with ur Session variable..

    H Offline
    H Offline
    hardikr shah
    wrote on last edited by
    #14

    Hi, I know, but in my application, I have to allow both user to view and same data, but if any of one is deleting the data then I have to give message that this data is deleted by this particular user. And redirect another user to home page. So I have to access, another session user, from current user session. Means if current user is going to delete data, at the same time he can access the another user, who is seeing same data, and he will give message that data is going to be deleted. Thanks

    D 1 Reply Last reply
    0
    • H hardikr shah

      I am working with .Net 2.0, and I have condition in which user can delete data of a deal, but same deal is viewed by another user. So while user is going to delete, the another user got message that this particular deal is deleted by this particular user.And user is redirected to home page.

      D Offline
      D Offline
      Dev S
      wrote on last edited by
      #15

      I got an idea but it will slow down ur page litlle bit.. use ajax and refresh the dataset after some time say 3 seconds and if it dont find any data there then just display a alert message the record has been deleted.. So it suits ur requirement??

      H 1 Reply Last reply
      0
      • A Amit Sk Sharma

        U can put a log there in DB with user ID of the person deleting record. When any one tries to fetch deleted data refer log table first and if it has entry for the same; pick user name from there and if no record exists for tht student(ur example)in log, pick actual data and display it. Hope it will give u a solution

        With Thanks & Regards Amit Sk Sharma

        H Offline
        H Offline
        hardikr shah
        wrote on last edited by
        #16

        Hi, I know, but in my application, I have to allow both user to view and same data, but if any of one is deleting the data then I have to give message that this data is deleted by this particular user. And redirect another user to home page. So I have to access, another session user, from current user session. Means if current user is going to delete data, at the same time he can access the another user, who is seeing same data, and he will give message that data is going to be deleted. Thanks Reply·

        1 Reply Last reply
        0
        • D Dev S

          I got an idea but it will slow down ur page litlle bit.. use ajax and refresh the dataset after some time say 3 seconds and if it dont find any data there then just display a alert message the record has been deleted.. So it suits ur requirement??

          H Offline
          H Offline
          hardikr shah
          wrote on last edited by
          #17

          Hey thanks for quick reply, but don't we have anything through which we can notify another session of user, through Global.asax Application_start events. I am planning to use Application_start event by defining arraylist. we user is going to view record, data is inserted in this arraylost. then when user is going to delete the page it will check for same data from Application array list. And through it he can find session of that particular user and give message. but i don't know how to give message to another user with out he is not firing any postback event

          D 1 Reply Last reply
          0
          • H hardikr shah

            Hi, I know, but in my application, I have to allow both user to view and same data, but if any of one is deleting the data then I have to give message that this data is deleted by this particular user. And redirect another user to home page. So I have to access, another session user, from current user session. Means if current user is going to delete data, at the same time he can access the another user, who is seeing same data, and he will give message that data is going to be deleted. Thanks

            D Offline
            D Offline
            Dev S
            wrote on last edited by
            #18

            As you told me it is not a big deal then just keep log in ur db of current user and the record id viewed by them and update it evrytime they view some another record. When a user try to delete the record it is first checked in the logtable it is being viewed by someone or not. If it is viewed by some one then just return the person name or id as hyperlink. But u hav to make some messaging system in your application to notify the another user about the delete.

            H 1 Reply Last reply
            0
            • H hardikr shah

              Hey thanks for quick reply, but don't we have anything through which we can notify another session of user, through Global.asax Application_start events. I am planning to use Application_start event by defining arraylist. we user is going to view record, data is inserted in this arraylost. then when user is going to delete the page it will check for same data from Application array list. And through it he can find session of that particular user and give message. but i don't know how to give message to another user with out he is not firing any postback event

              D Offline
              D Offline
              Dev S
              wrote on last edited by
              #19

              ok it is a pretty difficult task. there is a solution but may its not the be the best one but it will work for u. we reached to the solution that u will get the username of the person viewing the record. then just in some table update a flag for notification with the useraname of viewer. Now add a component in your application that will be called on each page . On that component place a alert message which wil be fired when the flag of the notification table is true. And through ajax get the dataset refreshed after few seconds say 3 sec. Hope now u get the solution... :-D

              H 1 Reply Last reply
              0
              • D Dev S

                As you told me it is not a big deal then just keep log in ur db of current user and the record id viewed by them and update it evrytime they view some another record. When a user try to delete the record it is first checked in the logtable it is being viewed by someone or not. If it is viewed by some one then just return the person name or id as hyperlink. But u hav to make some messaging system in your application to notify the another user about the delete.

                H Offline
                H Offline
                hardikr shah
                wrote on last edited by
                #20

                sorry, by mistake i gave you 1 in rating. I want to give message to another user that particular recored is deleted and recirect him/her to Home page, when a User is going to delete a record. So I have to access session(instance) of another user, but I havn't idea, how to access another user at the same time who is viewing same record. Thanks Hardik Shah

                1 Reply Last reply
                0
                • D Dev S

                  Hi, First point is this how you are going to notify the user who is already watching the deal(until he refreshes the page). So its better lock it while it is viewed by other and for this create a log in ur db in synchronisation with ur Session variable..

                  D Offline
                  D Offline
                  Dev S
                  wrote on last edited by
                  #21

                  ok it is a pretty difficult task. there is a solution but may its not the be the best one but it will work for u. we reached to the solution that u will get the username of the person viewing the record. then just in some table update a flag for notification with the useraname of viewer. Now add a component in your application that will be called on each page . On that component place a alert message which wil be fired when the flag of the notification table is true. And through ajax get the dataset refreshed after few seconds say 3 sec. Hope now u get the solution...

                  1 Reply Last reply
                  0
                  • D Dev S

                    ok it is a pretty difficult task. there is a solution but may its not the be the best one but it will work for u. we reached to the solution that u will get the username of the person viewing the record. then just in some table update a flag for notification with the useraname of viewer. Now add a component in your application that will be called on each page . On that component place a alert message which wil be fired when the flag of the notification table is true. And through ajax get the dataset refreshed after few seconds say 3 sec. Hope now u get the solution... :-D

                    H Offline
                    H Offline
                    hardikr shah
                    wrote on last edited by
                    #22

                    Hey thanks for reply, I think i got solution from your above answer. But can you have any way from which we can make a track of all current user of my application by his identity. thanks and regards, Hardik

                    D 1 Reply Last reply
                    0
                    • H hardikr shah

                      Hey thanks for reply, I think i got solution from your above answer. But can you have any way from which we can make a track of all current user of my application by his identity. thanks and regards, Hardik

                      D Offline
                      D Offline
                      Dev S
                      wrote on last edited by
                      #23

                      if u are using some login system in your application then it is very easy to track users otherwise there are some commands in c# to get ip address of the user(but it is not much suitable for u.)

                      H 1 Reply Last reply
                      0
                      • D Dev S

                        if u are using some login system in your application then it is very easy to track users otherwise there are some commands in c# to get ip address of the user(but it is not much suitable for u.)

                        H Offline
                        H Offline
                        hardikr shah
                        wrote on last edited by
                        #24

                        ok thanks a lot to help me for finding proper solution of my problem.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups