|
|
Agreed but I don't have a messenger here.
I changed the and the ShowTooltip(message) worked. No runtime error.
However, when I put the code back to the way it was I don't get the runtime error but I do get a webpage message with a number in it. When I press the OK button, it goes through a series of three messages having different numbers as I press OK after each one. Hovering over a row starts the series of messages over again.
Any idea? I know this is abstract and you probably have better things to do but you have been a big help.
|
|
|
|
|
I'll try this again
I changed the "" to "<script type="text/javascript">" and I do not get the runtime error anymore for the ShowTooltip(message).
So, I changed it back to the original code and no longer get the runtime error. However, I get a webpage message window with a number in it. Pressing OK brings up another webpage message with another number in it. This happens about 3 times. Hovering over a row restarts this series of messages with a different number in each.
Any ideas? I know this is abstract but you have been a big help on this.
I do not have a messenger here and I know this is cumbersome.
|
|
|
|
|
Can you send me print screen of that error message so I can take a look?
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Your last message is broken so send me direct email with your last message on my person id:
ahamad.parwej@gmail.com
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
With help from this forum (Thanx Parwej Ahamad) I got what I needed. I am including the code here in case it can help others. The application has 119 columns and this Popup displays the employee name, job unit and job description by hovering over any row as the user scrolls horizontally.
This was based on A Simple DataGrid Row Tooltip For Beginners.[^]
.aspx
<!-- Script and Div to set up the Popup with Employee Info -->
<script type="text/javascript">
function ShowTooltip(LName,FName,JUDesc,JTDesc)
{
document.getElementById("td0").innerText=LName;
document.getElementById("td1").innerText=FName;
document.getElementById("td2").innerText=JUDesc;
document.getElementById("td3").innerText=JTDesc;
x=event.clientX + document.documentElement.scrollLeft;
y=event.clientY + document.documentElement.scrollTop + 5;
Popup.style.display="block";
Popup.style.left=x;
Popup.style.top=y;
}
function HideToolTip()
{
Popup.style.display="none";
}
</script>
<div id="Popup" class ="transparent">
<div style="BACKGROUND-COLOR:#003366"><center><b>Employee Info</b></center></div>
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="td0" align="left"></td>
</tr>
<tr>
<td id="td1" align="left"></td>
</tr>
<tr>
<td id="td2" align="left"></td>
</tr>
<tr>
<td id="td3" align="left"></td>
</tr>
</table>
</div>
</div>
.aspx.cs
public void gvRoles_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.DataItem != null)
{
e.Row.Attributes.Add("onmouseover", "ShowTooltip('" +
DataBinder.Eval(e.Row.DataItem, "EmployeeNameLast").ToString() + "','" +
DataBinder.Eval(e.Row.DataItem, "EmployeeNameFirst").ToString() + "','" +
DataBinder.Eval(e.Row.DataItem, "JobUnitDescription").ToString() + "','" +
DataBinder.Eval(e.Row.DataItem, "JobTitleDescription").ToString() + "');");
e.Row.Attributes.Add("onmouseout", "HideToolTip();");
}
}
style.css
.transparent { BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; DISPLAY: none; FILTER: alpha(opacity=80); BORDER-LEFT: black 1px solid; WIDTH: 180px; COLOR: white; BORDER-BOTTOM: black 1px solid; POSITION: absolute; HEIGHT: 90px; BACKGROUND-COLOR: blue }
|
|
|
|
|
Thanks, You will be always resolved your issue with this forum.
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Hi.
I have a problem with selecting a control from codebehind.
This is my scenario:
1. i get a string from a webservice (session): string boxstring = "<input type="text" id="MainContent_TextBoxStopRoadName01" name="ctl00$MainContent$TextBoxStopRoadName01">";
2. i insert this string to a <div id="boxcontainer"> from codebehind like this: boxcontainer.InnerHtml=boxstring;
3. Page loads
4. User types text in the box, and clicks a button to submit it
5. How do i find this textfield from codebehind from its id? I would like to get the field as an TextBox control, but the text value is the most important.
I´ve tried several things, like Findcontrol("id") and Findcontrol("id").Findcontrol("id") and so on. But it doesnt work.
Another thing does work though, if instead of a string, I create the textfield as an TextBox control, and then insert it: BoxContainer.Controls.Add(TextBox); - then it works! But it is not a possible solution in my situation. I only have the textbox (among many other elements) in a string.
Really hope you can help!
Thanks 
|
|
|
|
|
|
A page on the server is a transient object recreated whenever the browser requests the page. That's true for postbacks and callbacks too
|
|
|
|
|
I can't see any way of getting the control because it isn't a part of the pages controls but you should be able to get the value from the Request.Form collection after postback.
|
|
|
|
|
lvq684 wrote: 1. i get a string from a webservice (session): string boxstring = "";
This really doesn't make sense to me. What is the purpose of this webservice? The html is useless, it doesn't have any context.
Since the control is being added to the innerHtml of the div at runtime it is not available during postback; it isn't part of the page's control collection.
You could accomplish what you are asking by using a Panel in place of the div, or adding the runat=sever attribute to the div you have
TextBox txt = new TextBox();
div.Controls.Add(txt);
Since it is being added dynamically you must recreate the control during postback but then you could access it's value.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
I am working on an application where I have to Drag n Drop selected item from DropDownList, I can successfully drag n drop items from selected list but I have a issue with mouseup event.
The problem is that when I leave the dragged object mouseup event of that object fires, now what I want to do is to fire the event of the control where I am dropping item.
One more thing, controls where I am dropping items are not fixed, they vary. Now I want to get the Id of the control where the element is dropped.
Thanks in advance.
|
|
|
|
|
To get the id of the item being dragged you could try storing it's id on the mouse down event, and then using it on the mouse up. To get the id of the control the item is being placed into, try using a hover event to set an id and then use that.
-Dan
|
|
|
|
|
Configuration:
Application server : windows 2008 server R2 - 64 bit
Oracle client 10g : 64 bit
Visual Studio 2010 : 64 bit
Client side : 32 bit-XP
Successfully running the code on application server for oracle connectivity.
But after IIS configuration of application server while accessing application from client side not
connecting with oracle database.
It does not display the reports generated from Oracle on 32-bit XP
But it shows on 64-bit Win Server 2008.
Anybody help me??
I have never failed,I just found 1000 ways that never works.
Regards,
Victory.
|
|
|
|
|
Hi,
I have a Temp Folder in my solution and i copied one file into Temp Folder, i need to open copied file through code.
I tried with File.Open(),but it is not opening file.
Please suggest me better way to do this.
Regards
Vishnu
|
|
|
|
|
string content = System.IO.File.ReadAllText("myFile.txt");
---------------
<a href="http://www.serverside.no">www.serverside.no</a>
|
|
|
|
|
vishnukamath wrote: I tried with File.Open(),but it is not opening file.
Are there any exceptions? Showing what you have done may help us to point out problems/solutions.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What is the meaning of "Open" file?
You want to open it reader or you want to execute file?
(suppose i have a word document and you want to open it with Microsoft Word or in memory)
sunaSaRa Imdadhusen
+91 99095 44184
+91 02767 284464
|
|
|
|
|
If it is a ASPNET based solution (a website), you will need proper permissions to access temp folder. Check the app pool for your web site and identity/logon-user under which app pool is running. Make sure the identity has rights to access temp folder and files under that folder.
|
|
|
|
|
Hi Guys,
I have an adv banner , I want to calculate Number of user who click on banner.
|
|
|
|
|
OK, but do you have a question?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Store a count somewhere, increment by one each time it is clicked.
Where is your problem?
|
|
|
|
|
Are you trying to track the number of times the banner is clicked, or the number of individual users who've clicked on the banner? The two aren't necessarily the same.
|
|
|
|
|
Agreed..., but that is more or less just a filtering mechanism layered on the same click counter, isn't it? (I haven't had to do something like this in a very long time)
Now he has to go and re-read his homework for the weekend...
I wasn't, now I am, then I won't be anymore.
|
|
|
|