Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp panel

Posted on 2004-09-22
9
Medium Priority
?
647 Views
Last Modified: 2012-05-05
Hi Experts,

Is there any way to do get some session variable value into asp:panel element onMouseOver event ?

Thank you.
0
Comment
Question by:fpoyavo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 2

Expert Comment

by:netjkus
ID: 12125785
Store the session value in a variable on Mouseover event,

then access the value in the element  Text as <%#DataBinder.Eval(Container.DataItem, "SessionVar")%>

0
 
LVL 1

Author Comment

by:fpoyavo
ID: 12126098
Netjkus,

Not following. Please more details.
I already have session variable populated in another class.
I need just to access it onmouseover texbox without Javascript.

Thank you.
0
 
LVL 2

Expert Comment

by:netjkus
ID: 12126141
The session variable is accessible anywhere in the program.. But I dont quite clear why you dont see that. You dont need to use Javascript.. Do you need to display that value on tooltip or something?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Accepted Solution

by:
SimonTocker earned 2000 total points
ID: 12130951
If your talking about accessing things on the client browser in the page when its already rendered, too late.  You need to understand the difference between server side and client side, all the c# code you have in your code behind once rendered is now not accessible to the client in the rendered page uless you spat it out to the client.

Like netjkus says, do you want a tooltip, thats one way to get that info without using Javascript use title="fred" in the label/panel.

Otherwise if you want something more complicated than that you are talking javascript, the onMouseOver event IS a client scripting event, your are using client side script from that point.  


BTW.   A panel, whilst being a handy place holder and all the vb guys are used to panels, renders different in non-ie browsers, it becomes a table, something you might not want.  Use a place holser and labels instead of panels if you dont want that unwated behaviour.



0
 
LVL 1

Author Comment

by:fpoyavo
ID: 12133153
Netjkus,

I just need to get session variable value on mouse over textbox.

Thank you.
0
 
LVL 3

Expert Comment

by:w_shaila
ID: 12138309
TextBox1.Attributes.Add("onmouseover","javascript:getSession('"+ Session["ID"].ToString() + "')");

getSession is a Javascript function

function getSession (id)
                  {
                        alert(id);
                  }

Like this you can get it
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 12143390
W_Shaila,

Yep. The only problem is that this Javascript has to be server side to get Session variables which does not work in C#. I was trying it along time ago.

Thanks anyway.
0
 
LVL 3

Expert Comment

by:w_shaila
ID: 12143757
The code which I posted is in C# only. it is working for me.
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 12162967
W_shaila,

In fact VS does not compile your code at all.

Thank you.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question