|
I want to save database round trip because there are 20 pages, and each page load if I will go to check whether this particular record is deleted by another user.
I think it is not an fesiable way.
|
|
|
|
|
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·
|
|
|
|
|
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..
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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...
|
|
|
|
|
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??
|
|
|
|
|
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
|
|
|
|
|
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...
|
|
|
|
|
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
|
|
|
|
|
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.)
|
|
|
|
|
ok thanks a lot to help me for finding proper solution of my problem.
|
|
|
|
|
Hi
I have written java script code which is working fine in IE
but its not working in MOzila
code are............
function btntest_onclick()
{
var val1 = document.getElementById('username').value;
var val2 = document.getElementById('password').value;
self.location.href ("login.aspx?username=" + val1 + "&password=" + val2 + "");
}
Any Suggestion
Thanks in Advanced
krishna veer singh
|
|
|
|
|
Hi,
Try window.open("");
Regards
Anil Pal
|
|
|
|
|
its opening new page while i want to open in same page
krishna veer singh
|
|
|
|
|
Hi
Try this
document.location.href = "http://www.google.com";
Regards
Anil Pal
|
|
|
|
|
Hi all,
I want to know how to drag an item in the list box and drop into the text box (which already have text inside). If drag and drop is not available in asp.net, how to put a listbox item to the text box. Please answer my questions. Thanks in advance!
|
|
|
|
|
Hi,
First of all drag and drop facility is not available in asp.net.
Now u want to drag listbox itme to textbox, which also have some text already.
Now here i would like to know wharts yr wexact requirement. Can u use another listbox in place of textbox? If yes, then i can provide u a easy solution for that.
If no, then how u r going to display the text in textbox (Including the mulitple listbox items)?
feel free to ask
Regards
Anil Pal
|
|
|
|
|
Hi,
Thanks for your answer. What I really wanna do is to put the list box item to the textbox (which already have text there). I am testing with alternative way now. I try to put list box item to text box when i click on a button. But I still cannot put the item between other text. If you have some more idea, pls drop me a line.
|
|
|
|
|
You can do drag and drop, but it's lots of javascript. There are examples on the web.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Yeah, I have some examples of javascript for drag and drop. But I want to use javascript if there's no other options coz I am very new to that.
|
|
|
|
|
Hi,
I hav a better alternate:
you can do it by keeping a button near your listbox and poitning towards your textbox. And after selecting the desired item from listbox click on the button to move it to textbox. And at the same time remove that item from your listbox. So it will give the feeling as if it is oved from listbox to textbox.
|
|
|
|
|
Hi,
Thanks for your answer. I also have same idea with you and I am testing it now. But there's another problem. I can put the list box item to text box but if the text are already existed in the text box, the previous text will be disappeared. I want to insert between other text. Any other idea?
|
|
|
|
|
i have a server with configured active directories, and have a client system. so, now i am trying to give privilages in active directories to that client system using asp.net
any one help me, that how to do this???
|
|
|
|