|
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
|
|
|
|
|
Hi, I have made a web service and when I build the application the Begin and End Methods for the service do not appear. For this I created the Begin and End Method Myself, but still when I compile it, the Begin and End methods do not appear.
Also, the windows application where I am adding the web reference to this service, the Begin and End methods do not appear and therefore I am not able to make aynchronous calls to the methods of the webservice.
Its urgent. Kindly help. I am using C#.
-----Have A Nice Day-----
|
|
|
|
|
Am doing a project on designing shopping site.I am not understanding how to develop search engine.Please provide
me idea on how many search engines available in ASP.NET.I want to desgin search engine for my site only,means will search only my site content.Please consider....its urgent...
sandeephs
|
|
|
|
|
Sandep H S wrote: how many search engines available in ASP.NET
None.
Sandep H S wrote: I want to desgin search engine for my site only
So, you're saying you want to search your database. How is that a major task ?
Sandep H S wrote: ....its urgent...
That's great, because everyone else today has said 'it's not urgent', thus pushing you to the head of the queue....
Do you know any SQL at all ? Or does your site not have a database back end ( i.e. it's a disaster )
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 )
|
|
|
|
|
Christian Graus wrote: pushing you to the head of the queue....
It'd be okay if the head of the queue is at the edge of some very, very high cliff with shark infested waters below
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Sandep H S wrote: its urgent...
how come you can say this to a bunch of people who offers free help ?
Sandep H S wrote: I am not understanding how to develop search engine
It depends on what your search is targeted ? If your search is targeted the products which is in the shopping site, I recommend you to create a table and store all the keywords for the projects here. Index the table to get good performance. When user enters search criteria, search on this table and show the results. This table has to be updated when new products are added/deleted.
If you are looking for a complete site search, there are plenty of articles available here. Search for it.
|
|
|
|
|
If he's running an online store and it's not already driven by a database, then the whole thing is an irretrievable mess before he starts.
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 )
|
|
|
|
|
Yes that's correct. It will be tough to implement
|
|
|
|
|
you can use google to search within a specific site,it will be like that site:domain etc, google it "how to search withing site using google" if you want to do this kind of thing.
Regards.
Tasleem Arif
|
|
|
|
|
u can use Google API (for that u have to show google logo) adjacent to u'r search control
Google API is an Open source
|
|
|
|