|
hi all,
i have a problem dealing with cascading style sheet.
how do i link my style sheet (placed background pic inside) to Default.aspx (example).
i want the picture to appear when i run Default.aspx
error occurs when i tried.
error message:-
Error 1=> Cannot switch views: Validation (XHTML 1.0 Transitional): Element 'link' cannot be nested within element 'html'.
where shall i put this link then?
link: thanks for the help..
-DarkangeL-
|
|
|
|
|
|
thanks for your help..
i can do it already..
thanks again..
-DarkangeL-
|
|
|
|
|
Hi, I was wondering if anyone has come across a solution to this problem, I need to get all possible unique permutations for a list of numbers (as sourced from a flagged enumeration). For example:
Enum def:
In = 1
Out = 2
Over = 4
Hover = 8
Would equate to:
In, Out, Over, Hover
In, Out, Over
In, Out
In, Over
In, Hover
In, Over, Hover
In
Out, Over, Hover
Out, Over
Out, Hover
Out
Over, Hover
Over
Hover
I need to end up with a list of all the possible permutations this enumeration could possibly be. A rather larget snag is that it could be any flagged enumeration, the method needs to take a type (which will be an enumeration type) and dynamically work out this list at run-time.
I think this is correct, the list looks unique but its late and I need sleep! Any help would be appreciated!
Thanks,
Kieron
|
|
|
|
|
Here's one way to generate the output you're looking for. An alternative approach is to set some enum value to each subset of all possible values, calling the Enum.ToString() method on every iteration.
<br />
[Flags]<br />
enum testenum { In, Out, Over, Hover }<br />
<br />
static void PrintFlags(string[] names, IList curnames, int idx) {<br />
<br />
if (idx == names.Length) {
if (curnames.Count == 0) {<br />
System.Console.WriteLine("[None]");<br />
} else {<br />
for (int i = 0; i < curnames.Count - 1; i++)<br />
System.Console.Write("{0}, ", curnames[i]);<br />
System.Console.WriteLine(curnames[curnames.Count - 1]);<br />
}<br />
return;<br />
}<br />
<br />
curnames.Add(names[idx]);<br />
PrintFlags(names, curnames, idx + 1);<br />
<br />
curnames.RemoveAt(curnames.Count - 1);<br />
PrintFlags(names, curnames, idx + 1);<br />
}<br />
<br />
static void Main(string[] args) {<br />
<br />
string[] names = Enum.GetNames(typeof(testenum));<br />
ArrayList curnames = new ArrayList(names.Length);<br />
PrintFlags(names, curnames, 0);<br />
<br />
}<br />
Hope this helps!
|
|
|
|
|
Hi, thats excellent! Works a treat, thanks very much! (:
|
|
|
|
|
|
This builds an ArrayList of all combinations of the enum, then dumps it to the console. This approach doesn't use recursion or ArrayList manipulation.
using System;
using System.Collections;
public class MyClass
{
[Flags]
enum testEnum
{
In,
Out,
Over,
Hover
}
static void Main (string[] args)
{
string[] names = Enum.GetNames (typeof (testEnum));
ArrayList[] list = GetCombinations (names);
foreach (ArrayList items in list)
for (int i = 0, last = items.Count - 1; i <= last; i++)
Console.Write (items [i] + (i < last ? ", " : "\n"));
Console.ReadLine();
}
static ArrayList[] GetCombinations (string[] a)
{
int count = TwoPow (a.Length) - 1;
ArrayList[] list = new ArrayList [count];
for (uint i = 1; i <= count; i++)
{
ArrayList items = new ArrayList();
for (uint j = 0, bits = i; bits != 0; j++, bits >>= 1)
if ((bits & 1) != 0)
items.Add (a [j]);
list [i - 1] = items;
}
return list;
}
static int TwoPow (int e)
{
int p = 1;
for (int i = 0; i < e; i++)
p <<= 1;
return p;
}
}
Fatgeek
|
|
|
|
|
Hello,
I have a setup project that installs a windows service as well as a stand alone application. The setup project also includes a custom action which writes an xml config file. All works fine on the install, but on the uninstall (from control panel > add remove programs) it does not unregister the service. Is there something im missing in the setup project or is there a need for another custom action?
thanks
|
|
|
|
|
have u stopped ur service before uninstalling????
sathy
|
|
|
|
|
yup, what essentially ends up happening is that you have to remove the registry key to remove it after the uninstall.
any idea?
|
|
|
|
|
r u sayin tht u have to manually remove the registry keys...
i tried on creatin a setup for a windows service it is installing and i can also uninstall it.. but i cant start the service... it throwin an error sayin JIT debuggin failed
sathy
|
|
|
|
|
I have a list definition,
public class List<br />
{<br />
private int index;<br />
private string name;<br />
<br />
}
and a table
<br />
public class Table<br />
{<br />
public static List List1 = new List(1,"List1");<br />
public static List List2 = new List(2,"List2");<br />
...<br />
<br />
}
Now , if I want to add a method of Table
public class Table<br />
{<br />
public static List GetListFromIndex( int index){...}<br />
}
How can I avoid a lot of "switch case"????
Thanks!. I know this maybe related to "reflection" , but cannot figure it out.
|
|
|
|
|
I don't know background so I must ask, why you dont use standard Array(List) of strings?
I mean (example),
public class Table
{
static ArrayList list;
public static string GetListFromIndex(int i){return (string)list[i];}
}
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
I'm sure this has been asked before, but I having difficulty finding the correct phrasing to return a valid search.
I would like to beable to send data to another application from my application.
For instance, if I have an already existant application that I have to type the same info into it each time I use it, several times a day where the only information that changes is a serial # and/or a product name.
I would like to build a soulution that would allow me to pre-program the data fields so that all I have to do is click a button and it populates all of the semi-static fields.
Any Ideas of what I would need to do, or where I need to look to find this answer?
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
Hi,
I have a datagrid & a datatable, and when I use the mousemove event, I run into trouble.
private void dgMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{ <br />
System.Windows.Forms.DataGrid.HitTestInfo hitInfo = dg.HitTest(new Point(e.X, e.Y));<br />
... // find out which cell is entered
dg.CurrentCell = new DataGridCell(hitInfo.Row,hitInfo.Column);<br />
... // use tooltip
}
The problem starts when I set dg.CurrentCell. Whatever it's set to, the backcolor of that cell changes to what looks like some default color (biege), and the text is highlighted. Also, the MouseUp event doesn't seem to fire, at least not consistently. I've been trying to figure this one out for a while now, and am pretty stuck. Anyone know what to do? You'd be my hero!
Thanks,
Mel
|
|
|
|
|
It seems you are selecting a cell in the programmatically in the mousemove event by setting the CurrentCell. That is the reason its hightligting the cell with the default color and text is highlighted. Since there is not mouseDown happening here , mouseeUp would not be called.
Why do you need to set the CurrentCell in the mousemove anyway?
Thanks,
VPMahank
|
|
|
|
|
Hi!
I use CurrentCell to get the text in the cell.
private void dgMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{ <br />
System.Windows.Forms.DataGrid.HitTestInfo hitInfo = dg.HitTest(new Point(e.X, e.Y));<br />
if (hitInfo.Row < tCat.Rows.Count && hitInfo.Row > -1)<br />
{<br />
dg.CurrentCell = new DataGridCell(hitInfo.Row,hitInfo.Column);<br />
DataGridCell dc = dg.CurrentCell;<br />
string txt = dg[dc].ToString();<br />
if (txt.Length > 10){ //tooltip stuff
}<br />
}<br />
}
There's one more case where I have this problem of a beige cell background and highlighted text - when I click on a cell (on MouseDown). As soon as the mouse comes back up, it goes back to the colors I want it to be. Is there any way to get rid of this?
Thanks so much!
Mel
|
|
|
|
|
we've got several different printers from several different manufacturers in our office that i need to try to retreive the machince specific info(serial, mac, ip, pageCount, etc) thru a rich-client.
All printers have an installed/firmware webserver that displays all this info...and my hopes were to find a way to contact these devices and grab this info.
I wasn't sure if there was an easier way to do this other than parse the html to get the info....('cause) the problem with doing that is that since they are all different manufacturers the format for the html is all different.
So the question becomes how can i retrieve this info from the devices
(does anyone know how to comunicate to the printer via a printer language{not sure what that would be} ?)
|
|
|
|
|
There's no standard for this, so scraping is the only option you have.
Until the manufacturers get together and agree on an XML format to supply the information in, scraping, be it a web page or a telnet session, is all you've got.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
|
|
I have 3 panels in the screen. All the three panels are in a main panel. The three panels are next to each other horizontally and fill the main panel vertically. All these panels have round corners instead of standard sharp edges( I have panelExt class inherited from standard panel class). Now I need to have a splitter between 1st and 2nd panels and also between 2nd and 3rd. I think because of having the round edges , when I say left and right panels dock propery to left and right respectively, these panels are shifted down by around 40 pixels and then docked. But I want them to fill the main panel vertically. Is there any work around for this?
If there is no solution to this, please suggest any custom splitter which does standard splitter job except for non docked controls.
Thanks,
VPMahank.
|
|
|
|
|
I want to build an icon on the desktop that will load a program that I am working on, which will display a loading page. Any ideas?
|
|
|
|
|