|
As Paul said, you're not being very clear - however I think this may point you in the direction you want to go....
Dim instance As HttpSessionState = HttpContext.Current.Session
Dim value As NameObjectCollectionBase.KeysCollection = instance.Keys
Dim key As String
For Each key In value
Response.Write("Session(""" & key & """) = " & CStr(Session(key)) & "<br />")
Next
(You will need to amend this if any of your session variables contain values that can't be converted to strings...)
|
|
|
|
|
Dear phil,
first of all thank you for your answer, i'm developing a form using (c# asp.net) and i'm adding it to anexisting website which i don't have the source code. all i could get are the session without their names. so i have session[0]='159900' but i don't know its name
hope i'm now a little bit more clear.
thank you for your help
|
|
|
|
|
How are you adding to Session ?
If you are adding ussing index then you should retrive in same way (providing the same index)
If you are giving a name(as key) while adding but while retriving you don't have that name then you can't get as there might gave n number of key value pairs in the Session
By the way why you want to retrive the name from session ?
Session.Keys will return all the Keys (name) stored in that session
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
thank you a lot the last world you said was the answer
|
|
|
|
|
You can get what's put into session:
Session["HelloWorld"] = "Hello, my name is Tim.";
Response.Write(Session("HelloWorld"));
You should see "Hello, my name is Tim."
Or are you asking about enumerating the Session collection?
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
|
sameera28 wrote: i m making a final yr project
..so what have you been doing for your other years? Nothing to do wtih programming, judging by your questions. Don't expect anyone else to do work for you when you can't be bothered to do any for yourself.
|
|
|
|
|
Person has the following properties :ID, Resume, Name, Gender
Resume is a Class too, it has the following properties: ID, ResumeName, Date, Content
Now , I get a collection IList<person>.
I binded the collection to Gridview, like this:
CS file:
IList< Person > personList = getPersonList();<br />
<br />
GridView.DataSource = personList;<br />
Gridview.DataBind();
aspx file:
<asp:boundfield headertext="name" datafield="Name" xmlns:asp="#unknown" /><br />
<asp:boundfield headertext=" gender" datafield=" resumename" xmlns:asp="#unknown" /><br />
<asp:boundfield headertext="ResumeName" datafield=" Resume" xmlns:asp="#unknown" /><br />
<asp:boundfield headertext=" Date" datafield=" Resume " xmlns:asp="#unknown" />
modified on Tuesday, September 16, 2008 10:56 AM
|
|
|
|
|
What is the problem you are facing?
|
|
|
|
|
Hi
I want to extract sustrings from a string and want to store in an array.
The string is dynamic it will change but the criteria to extract substring is same.
say for example a string str="something is [!better] than [!nothing]"
so i need to extract [!better] and [!nothing] from the string and store it in a string array, the string is dynamic it changes but i need to extract data between [ and ] including both the square brackets.
If anybody can send any sample code, I will be very thankfull.
Thanks
Ansari
|
|
|
|
|
// I could be off by one
string strXX = "xxx [ xxx ],,,,";
int startX = strXX.IndexOf("[");
int endX = strXX.IndexOf("]");
strXX.Substring( startX, (endX - startX+1);
// I hopes this help; Signed... Linda
xxx
|
|
|
|
|
hi,
i am getting this error when i am redirecting to a page using httpcontext.current.server.transfer(url,true) which is in try{}
|
|
|
|
|
don't put the code in the try catch block whenever you are redirecting to another page with second parameter true it is going to throw exception
remove try and catch block and check
Let me know if it got fixed
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hi,
thanks.. it got fixed
|
|
|
|
|
Hi Friends
i need to design rating system like code project rating.Any help how design.I design using ajaxControlTool kit but i need like hand symbols with rating
Thanks in Advance
your's subbu
|
|
|
|
|
Can you not just change the image to hands instead?
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
With some knowledge of math, creating a rating system is pretty trivial. What is it, exactly, you are having trouble with?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi guys
Is there a way to catch the onclick of a linkbutton in gridview seperatly to the onselectedindexchanged event for the gridview?
thanks
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
Yes you can do it by assigning some command Argument to link buttons
Now whenever you click link button Default event of gridview is going to call (don't remember the name) In that event check the event argument for the if this are the one you assign for Link button meand link button is clicked call the business rules you want to implement
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Im developing in C# and im changing the selected index of a combox box dynamically during coding, and on selectedindex event i want to load another combobox. My problem is the second combobox is not being loaded when the first one's changed during runtime, its only trigering the selectedindex changed when i do a click, does nayone know whats missing from my code.
|
|
|
|
|
check it AutoPostBack property
make it true
thankx
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
omlac wrote: ...selected index of a combox box...
Then your question belongs to C# board.
In selectedindex change event of combobox bind your second combobox.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Its not triggering the event(SelectedIndexchanged),
|
|
|
|
|
Hi All,
I am facing problem with callback event.
It is working fine in IE and safari but not in mozilla.
any help will really appreciable.
Thanks,
Sri
|
|
|
|