|
Sounds like when you find two nodes that are the same at one level, you need to write a recursive function that steps down to see if the child nodes are also the same.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have created a validation in js for my website and calling that function on a button(save)... can u explain- If iam clicking on any control, it is showing error: Object expected (anonymus function call).
Regards,
Dhawal Seth
Software Consultant
|
|
|
|
|
Download the firebug add in for firefox, then the code will break at your error and you'll be able to diagnose it. Without you posting the code, there's no way anyone can help you, and the FF/FB solution is your first port of call.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Perhaps if you show some of your code.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
I want to know whether the session id is unique when a group of people browsing through the same site, same page at the same time.
Can anybody help?
Please send me the code which will generate the session id.
Prakash Mishra(Banglore,India)
|
|
|
|
|
SessionID is generated in RAM on the Webserver and It is not a persistent property. It is unique at the time is it created.but not guaranteed to be unique.
Same SessionID might be used again after your Web server has been restarted. This means that you shouldn't attempt to track the same user over time by using her SessionID.
|
|
|
|
|
Abhijit Jana wrote: SessionID is generated in RAM
I don't think so. I think it's stored as a cookie in client machine.
|
|
|
|
|
But that is generated by the server !!!
|
|
|
|
|
N a v a n e e t h wrote: I don't think so. I think it's stored as a cookie in client machine.
It's created on the server, and also stored as a cookie on the client.
The server has to keep track of the session id:s that it has created, so that it can verify that the id exists when the client sends another reuqest.
In earlier versions of IIS, the Session object was used to keep track of session. In more recent versions, the Session object is only retained if any data has been stored in it, otherwise only the session id is retained, and a new Session object is created for every request.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Guffa wrote: It's created on the server, and also stored as a cookie on the client.
This is what I meant. Is it possible to access the session value from the id specified ? I mean if I pass the session id through querystring, is it possible to access the value ?
|
|
|
|
|
N a v a n e e t h wrote: This is what I meant.
But it was not clear from what you said.
N a v a n e e t h wrote: Is it possible to access the session value from the id specified ? I mean if I pass the session id through querystring, is it possible to access the value ?
No. A Session object can only be accessed by a request that is associated with the sesson, i.e. sends the session id in the correct cookie.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Guffa wrote: But it was not clear from what you said.
it's my language problem.
Guffa wrote: No. A Session object can only be accessed by a request that is associated with the sesson, i.e. sends the session id in the correct cookie.
Thanks.
|
|
|
|
|
This should really be asked on the ASP.NET forum.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi, I have one static method on form, i had class let's testclass
in static method of from i add items to listbox. now that static method i acess from class, it add item in listbox but donot show on from. after all complation of code it dipslays listbox items.
To see at debugg time i used message box b4 calling static method then it show on from. can any tell me how i can used another option to see.
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Hello,
It would help to understand your question if you show code snippeds of your problem.
All the best,
Martin
|
|
|
|
|
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void frmMain_Load(object sender, EventArgs e)
{
clsBatch objbatch = new clsBatch();
objbatch.fnBatch();
}
public static void status(strMsg)
{
//list control is static
lststatus.item.add(strMsg);
}
}
//class implimention
class clsBatch
{
public clsBatch()
{
}
public void fnBatch()
{
frmMain.status("Hi")
}
}
i have part of code unless uptill whole execution not complete i cant not see the list item on form. now i have see what item in list on the form then how i can? basicall it show client which function are complete or status of functions
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
Hello,
It's clear that during design time you will not see a control which is not implemented with the designer.
Apart from, that your code doesn't even compile.
Marking a control as static on a Form is just nasty, dirty and bad bad bad!
I think your problems started as you were not able to path the value (string) back to your form.
So you came up with the static solution!
You could path the instance of the form over the constructor of the "clsBatch" class and then call a non static method, which adds the item to the non static ListBox (which was placed over the designer).
class clsBatch
{
frmMain MainForm = null;
public clsBatch(frmMain mainForm)
{
MainForm = mainForm;
}
public void fnBatch()
{
if(MainForm!=null)
MainForm.status("Hi");
}
}
A nicer and more OO solution would be to use delegates, which is very good discriped in this article[^] from Colin!
But, the problem of not seeing your "Hi" will still be the same!
What you can do is:
Make a UserControl and place a Listbox on it.
Set the "Dock" property to "Fill".
Add the the code there and place the usercontrol, over the designer, on the Form.
You can instanciate the "clsBatch" in the constructor and call the method there.
public class ListBoxControl : System.Windows.Forms.UserControl
{
private System.Windows.Forms.ListBox myListBox;
private System.ComponentModel.Container components = null;
public ListBoxControl()
{
InitializeComponent();
clsBatch objbatch = new clsBatch(this);
objbatch.fnBatch();
}
public void status(string strMsg)
{
myListBox.Items.Add(strMsg);
}
...
The reason it will work now, is that for the usercontrol it's runtime now!
Hope it helps!
-- modified at 5:31 Thursday 25th October, 2007
All the best,
Martin
|
|
|
|
|
tnx very much
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
You are wellcome!
All the best,
Martin
|
|
|
|
|
Set a breakpoint, that's the option that makes sense. Or Console.WriteLine will output to the output window in VS.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void frmMain_Load(object sender, EventArgs e)
{
clsBatch objbatch = new clsBatch();
objbatch.fnBatch();
}
public static void status(strMsg)
{
//list control is static
lststatus.item.add(strMsg);
}
}
//class implimention
class clsBatch
{
public clsBatch()
{
}
public void fnBatch()
{
frmMain.status("Hi")
}
}
i have part of code unless uptill whole execution not complete i cant not see the list item on form. now i have see what item in list on the form then how i can? basicall it show client which function are complete or status of functions
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
pekhaleyogesh wrote: ForumC#
Subject:Re: alternative to messagebox.show() method.
Sender:pekhaleyogesh
Date:3:58 25 Oct '07
Two Same Question in Same time
If you want check anything in debugging time use
System.Diagnostics.Debug.Print("your message");
|
|
|
|
|
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void frmMain_Load(object sender, EventArgs e)
{
clsBatch objbatch = new clsBatch();
objbatch.fnBatch();
}
public static void status(strMsg)
{
//list control is static
lststatus.item.add(strMsg);
}
}
//class implimention
class clsBatch
{
public clsBatch()
{
}
public void fnBatch()
{
frmMain.status("Hi")
}
}
i have part of code unless uptill whole execution not complete i cant not see the list item on form. now i have see what item in list on the form then how i can? basicall it show client which function are complete or status of functions
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
i need code how do i use ilist in c# i want to store database values in an IList but i dont know how do I pleasse mention related methods also
thanks
kanza
|
|
|
|
|
Hello,
First IList is an Interface, so you can't instanciate it directly to add you datas.
You could create your own class which implements the IList interface,
or use framework classes which already do so (like ArrayList).
But before you do that, I would suggest to read the doku![^]
All the best,
Martin
|
|
|
|