Hi,
Can anyone tell me how to change a table cells background color or
background image in runtime with C#.
Karl-Inge 10 5695
You can use the cssClass attribute, e.g.
..TableCell1
{
background-image:url("imag es/Image1.gif");
}
and in your C# code:
TableCell td1= new TableCell();
td1.CssClass = "TableCell1 ";
//or you can add it without a CssClass like this:
td.Height = "100px";
td1.Width = "100px";
td1.Style.Add(" background-image", "url('image1.gi f')");
--
HTH,
Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote: Hi, Can anyone tell me how to change a table cells background color or background image in runtime with C#.
Karl-Inge
Thanks Williams
Karl-Inge
"Phillip Williams" wrote: You can use the cssClass attribute, e.g.
.TableCell1 { background-image:url("imag es/Image1.gif"); }
and in your C# code:
TableCell td1= new TableCell(); td1.CssClass = "TableCell1 ";
//or you can add it without a CssClass like this: td.Height = "100px"; td1.Width = "100px"; td1.Style.Add(" background-image", "url('image1.gi f')"); -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
Hi, Can anyone tell me how to change a table cells background color or background image in runtime with C#.
Karl-Inge
Hi Phillips
Your suggestion help me in the right directions, but I have still problem.
I’m trying to make a tab style horizontal menu similar to that you use on top
of your web http://www.webswapp.com.
Do you have an example?
Karl-Inge
"Phillip Williams" wrote: You can use the cssClass attribute, e.g.
.TableCell1 { background-image:url("imag es/Image1.gif"); }
and in your C# code:
TableCell td1= new TableCell(); td1.CssClass = "TableCell1 ";
//or you can add it without a CssClass like this: td.Height = "100px"; td1.Width = "100px"; td1.Style.Add(" background-image", "url('image1.gi f')"); -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
Hi, Can anyone tell me how to change a table cells background color or background image in runtime with C#.
Karl-Inge
Hi Karl-Inge,
In displaying menu items on my website, I use a Button server control whose
cssClass is set with a background image that gives that impression of a Tab
(without the rectangular edges). The button has both the onmouseout and
onmouseover events changing the cssClass (which in turn displays a different
background image to the button).
--
HTH,
Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote: Hi Phillips
Your suggestion help me in the right directions, but I have still problem. I’m trying to make a tab style horizontal menu similar to that you use on top of your web http://www.webswapp.com.
Do you have an example?
Karl-Inge
"Phillip Williams" wrote:
You can use the cssClass attribute, e.g.
.TableCell1 { background-image:url("imag es/Image1.gif"); }
and in your C# code:
TableCell td1= new TableCell(); td1.CssClass = "TableCell1 ";
//or you can add it without a CssClass like this: td.Height = "100px"; td1.Width = "100px"; td1.Style.Add(" background-image", "url('image1.gi f')"); -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
Hi, Can anyone tell me how to change a table cells background color or background image in runtime with C#.
Karl-Inge
Hi Phillip
Thanks for your help.
I can now change the buttons style with onmouseover and onmouseout.
My next problem is how I can reach a CSharp script when click the button.
Karl-Inge
"Phillip Williams" wrote: Hi Karl-Inge,
In displaying menu items on my website, I use a Button server control whose cssClass is set with a background image that gives that impression of a Tab (without the rectangular edges). The button has both the onmouseout and onmouseover events changing the cssClass (which in turn displays a different background image to the button).
-- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
Hi Phillips
Your suggestion help me in the right directions, but I have still problem. I’m trying to make a tab style horizontal menu similar to that you use on top of your web http://www.webswapp.com.
Do you have an example?
Karl-Inge
"Phillip Williams" wrote:
You can use the cssClass attribute, e.g.
.TableCell1 { background-image:url("imag es/Image1.gif"); }
and in your C# code:
TableCell td1= new TableCell(); td1.CssClass = "TableCell1 ";
//or you can add it without a CssClass like this: td.Height = "100px"; td1.Width = "100px"; td1.Style.Add(" background-image", "url('image1.gi f')"); -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
> Hi, > Can anyone tell me how to change a table cells background color or > background image in runtime with C#. > > Karl-Inge > >
Hi,
I found the solution. "onservercl ick" trigger C# event
Karl-Inge
"Karl-Inge Reknes" wrote: Hi Phillip
Thanks for your help.
I can now change the buttons style with onmouseover and onmouseout. My next problem is how I can reach a CSharp script when click the button.
Karl-Inge
"Phillip Williams" wrote:
Hi Karl-Inge,
In displaying menu items on my website, I use a Button server control whose cssClass is set with a background image that gives that impression of a Tab (without the rectangular edges). The button has both the onmouseout and onmouseover events changing the cssClass (which in turn displays a different background image to the button).
-- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
Hi Phillips
Your suggestion help me in the right directions, but I have still problem. I’m trying to make a tab style horizontal menu similar to that you use on top of your web http://www.webswapp.com.
Do you have an example?
Karl-Inge
"Phillip Williams" wrote:
> You can use the cssClass attribute, e.g. > > .TableCell1 > { > background-image:url("imag es/Image1.gif"); > } > > and in your C# code: > > TableCell td1= new TableCell(); > td1.CssClass = "TableCell1 "; > > //or you can add it without a CssClass like this: > td.Height = "100px"; > td1.Width = "100px"; > td1.Style.Add(" background-image", "url('image1.gi f')"); > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Karl-Inge Reknes" wrote: > > > Hi, > > Can anyone tell me how to change a table cells background color or > > background image in runtime with C#. > > > > Karl-Inge > > > >
You must have used an HtmlInputButton <input type="button"> object. If you
had used a Button server control it would have equally worked with the
Button.Click event, e..g
<asp:Button OnClick="Server Function"
onmouseover="th is.className='s omething';"
onmouseout="thi s.className='so methingelse';" Text="Menu1"
runat="sever"></asp:Button>
--
HTH,
Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote: Hi,
I found the solution. "onservercl ick" trigger C# event
Karl-Inge
"Karl-Inge Reknes" wrote:
Hi Phillip
Thanks for your help.
I can now change the buttons style with onmouseover and onmouseout. My next problem is how I can reach a CSharp script when click the button.
Karl-Inge
"Phillip Williams" wrote:
Hi Karl-Inge,
In displaying menu items on my website, I use a Button server control whose cssClass is set with a background image that gives that impression of a Tab (without the rectangular edges). The button has both the onmouseout and onmouseover events changing the cssClass (which in turn displays a different background image to the button).
-- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
> Hi Phillips > > Your suggestion help me in the right directions, but I have still problem. > I’m trying to make a tab style horizontal menu similar to that you use on top > of your web http://www.webswapp.com. > > Do you have an example? > > Karl-Inge > > > "Phillip Williams" wrote: > > > You can use the cssClass attribute, e.g. > > > > .TableCell1 > > { > > background-image:url("imag es/Image1.gif"); > > } > > > > and in your C# code: > > > > TableCell td1= new TableCell(); > > td1.CssClass = "TableCell1 "; > > > > //or you can add it without a CssClass like this: > > td.Height = "100px"; > > td1.Width = "100px"; > > td1.Style.Add(" background-image", "url('image1.gi f')"); > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Karl-Inge Reknes" wrote: > > > > > Hi, > > > Can anyone tell me how to change a table cells background color or > > > background image in runtime with C#. > > > > > > Karl-Inge > > > > > >
Thank you Phillip
Yes, I used HthmlInputButto n with runat=server, and that work fin.
Your suggestion work, but IntelliSense don’t give me the choose
“onmouseover, onmouseout” and I cant find information in Visual studio 2005
documentation that asp:button support this events?
Is it some basic information I have missed?
Karl-Inge Reknes
"Phillip Williams" wrote: You must have used an HtmlInputButton <input type="button"> object. If you had used a Button server control it would have equally worked with the Button.Click event, e..g
<asp:Button OnClick="Server Function" onmouseover="th is.className='s omething';" onmouseout="thi s.className='so methingelse';" Text="Menu1" runat="sever"></asp:Button> -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
Hi,
I found the solution. "onservercl ick" trigger C# event
Karl-Inge
"Karl-Inge Reknes" wrote:
Hi Phillip
Thanks for your help.
I can now change the buttons style with onmouseover and onmouseout. My next problem is how I can reach a CSharp script when click the button.
Karl-Inge
"Phillip Williams" wrote:
> Hi Karl-Inge, > > In displaying menu items on my website, I use a Button server control whose > cssClass is set with a background image that gives that impression of a Tab > (without the rectangular edges). The button has both the onmouseout and > onmouseover events changing the cssClass (which in turn displays a different > background image to the button). > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Karl-Inge Reknes" wrote: > > > Hi Phillips > > > > Your suggestion help me in the right directions, but I have still problem. > > I’m trying to make a tab style horizontal menu similar to that you use on top > > of your web http://www.webswapp.com. > > > > Do you have an example? > > > > Karl-Inge > > > > > > "Phillip Williams" wrote: > > > > > You can use the cssClass attribute, e.g. > > > > > > .TableCell1 > > > { > > > background-image:url("imag es/Image1.gif"); > > > } > > > > > > and in your C# code: > > > > > > TableCell td1= new TableCell(); > > > td1.CssClass = "TableCell1 "; > > > > > > //or you can add it without a CssClass like this: > > > td.Height = "100px"; > > > td1.Width = "100px"; > > > td1.Style.Add(" background-image", "url('image1.gi f')"); > > > -- > > > HTH, > > > Phillip Williams > > > http://www.societopia.net > > > http://www.webswapp.com > > > > > > > > > "Karl-Inge Reknes" wrote: > > > > > > > Hi, > > > > Can anyone tell me how to change a table cells background color or > > > > background image in runtime with C#. > > > > > > > > Karl-Inge > > > > > > > >
Those events are javascript. You'll have to write the event code yourself.
Karl-Inge Reknes wrote: Thank you Phillip
Yes, I used HthmlInputButto n with runat=server, and that work fin.
Your suggestion work, but IntelliSense don’t give me the choose “onmouseover, onmouseout” and I cant find information in Visual studio 2005 documentation that asp:button support this events?
Is it some basic information I have missed?
Karl-Inge Reknes
"Phillip Williams" wrote:
You must have used an HtmlInputButton <input type="button"> object. If you had used a Button server control it would have equally worked with the Button.Click event, e..g
<asp:Button OnClick="Server Function" onmouseover="th is.className='s omething';" onmouseout="thi s.className='so methingelse';" Text="Menu1" runat="sever"></asp:Button> -- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com
"Karl-Inge Reknes" wrote:
Hi,
I found the solution. "onservercl ick" trigger C# event
Karl-Inge
"Karl-Inge Reknes" wrote:
Hi Phillip
Thanks for your help.
I can now change the buttons style with onmouseover and onmouseout. My next problem is how I can reach a CSharp script when click the button.
Karl-Inge
"Phillip Williams" wrote:
> Hi Karl-Inge, > > In displaying menu items on my website, I use a Button server control whose > cssClass is set with a background image that gives that impression of a Tab > (without the rectangular edges). The button has both the onmouseout and > onmouseover events changing the cssClass (which in turn displays a different > background image to the button). > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Karl-Inge Reknes" wrote: > >> Hi Phillips >> >> Your suggestion help me in the right directions, but I have still problem. >> I’m trying to make a tab style horizontal menu similar to that you use on top >> of your web http://www.webswapp.com. >> >> Do you have an example? >> >> Karl-Inge >> >> >> "Phillip Williams" wrote: >> >>> You can use the cssClass attribute, e.g. >>> >>> .TableCell1 >>> { >>> background-image:url("imag es/Image1.gif"); >>> } >>> >>> and in your C# code: >>> >>> TableCell td1= new TableCell(); >>> td1.CssClass = "TableCell1 "; >>> >>> //or you can add it without a CssClass like this: >>> td.Height = "100px"; >>> td1.Width = "100px"; >>> td1.Style.Add(" background-image", "url('image1.gi f')"); >>> -- >>> HTH, >>> Phillip Williams >>> http://www.societopia.net >>> http://www.webswapp.com >>> >>> >>> "Karl-Inge Reknes" wrote: >>> >>>> Hi, >>>> Can anyone tell me how to change a table cells background color or >>>> background image in runtime with C#. >>>> >>>> Karl-Inge >>>> >>>>
--
Ray Booysen rj********@rjb. za.net This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: yurps |
last post by:
Hello here is my html, if you click the missing image in the first
column on the left, the div is shown, when clicked again the div
disappears...but the bottom border disappears as well...Is there anyway
to stop this...???
<HTML>
<HEAD>
<title>Conform Inbox</title>
<meta content="False" name="vs_snapToGrid">
|
by: Sugapablo |
last post by:
Can anyone help me out with some code to change three table cells
(<td>) when one is hovered over?
I have a calendar grid where each day is made up of three table cells and
I want all three to change color when any of the three are hovered over.
I would prefer to do this with pure CSS if possible, but if Javascript is
the only way...so be it.
--
|
by: N. Demos |
last post by:
I have a single row table with fixed dimensioned cells nested inside a
fixed dimensioned div, which has overflow: hidden. The div's dimensions
are such that It should only display the first two table cells.
This all renders correctly in MSIE 6.x, but doesn't in Firefox. In
Firefox, the cell widths are reduced so that all the cells are displayed
within the div frame.
I've played around with this: commenting out css properties to see if...
|
by: Arthur Shapiro |
last post by:
I'm the webmaster for a recreational organization. As part of one page of the
site, I have an HTML "Calendar at a Glance" of the organization's events for
the month. It's a simple table of a calendar, 7 across by whatever needed
down, and I manually create it each month - not a big deal.
Every day I go in and darken the background color of the current day's cell
by changing the appropriate <TD> entry to <TD bgcolor="c63800"> and...
|
by: lance |
last post by:
Hi,
I am a JS newbie. Hopefully the answer to my question is not trivial.
I have written a simple webpage that presents a table. A JS function
allows the viewer to click on a cell and each cell with the same
content has the background color changed to lime green. Each cell that
was previously highlighted has the background color changed back to
white. This works great with Firefox but does not work correctly with
IE. In IE, none...
| |
by: Johnny |
last post by:
In MSIE table captions are displayed at the same size as content. But
in Firefox the text displays at browser default, It also exceeds the
width of the table and the excess is hidden if the table is enclosed in
a bounding div.
If caption is given a font-size (eg 0.8em) with CSS text it displays
correctly, however MSIE then shows the text too small.
|
by: Romulo NF |
last post by:
Greetings again everyone
Recently ive been asked to develop a script to allow filtering in the content of the table, with dinamic options based on the own content. Example: a table with the name of some students and their respective numbers, and then you wanna show only studentes called "Joao", or students with number "5", or even only students called "joao" with number "5".
The structure we are going to use is a basic html table, like:
...
|
by: Romulo NF |
last post by:
Greetings again to everyone,
Im back to show this grid componenet ive developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data, call determined functions, and edit the data already present
What will you need to use the grid? A table with standard markup and an ID to call the script that will turn the table into a grid
Parameters:
tabelaID => id of the table that will...
|
by: Romulo NF |
last post by:
Greetings,
Im back here to show the new version of the drag & drop table columns (original script ). Ive found some issues with the old script, specially when trying to use 2 tables with drag&drop on the same page (which was not possible). Now ive a new concept of the script, more object oriented.
Ive also commented the whole code so you guys can easier understand it engine.
What exactly we need when trying to make a column drag &...
|
by: markszlazak |
last post by:
I'm a relatively slow response of table cells changing their
background color with mouseover/our in IE6 (Win 2K) but the response
is fine (fast) in Firefox. Why? The code is below. Sorry about the
length.
<html>
<head>
<title>Rapid Blocking Interface</title>
<style>
.calendar {
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |