HtmlTextWriterAttribute has Constants right, like all posible options to put as attributes within a HtmlTextWriter, i can use them whoopy, but how do i collect them, i can't fiund it, i tried Enumerating it through the IEnumerat interface and converting
it to a frase like
this.attribCollection[keys.Current.ToString()]
I'm just working with asp.net and i'm just trying to figure things out, where do i have to look in the framework to get this awnser, i tried F1 a 100 times on attributes comming from the intellisense but theres so much in it...., so i decided maybe somebody
here coult tell me that.
I guess, you are trying to find out the names and values of all attributes defined by the HtmlTextWriterAttribute. If it is so, below is a piece of code.
foreach (int val in Enum.GetValues (HtmlTextWriterAttribute))
{
HtmlTextWriterAttribute enumVal = (HtmlTextWriterAttribute) val;
string enumName = enumVal.ToString ();
}
Ehaa, thanks so much i'm waiting for this awnser for 3 days now
i was looking for this frase
int val
in Enum.GetValues (HtmlTextWriterAttribute))
Why i didn't find the solution in the framework or on msdn is they dont "serve" type based searching, nop instead object and class browser which force you to go in deep to get the actual solution, waaaaay to much information for me.
thing like the Enum Getvalues(Collection), would have figured that out on my own, and why, don't know i was searching for somehting more like
foreach(int val in HtmlTextWriterAttribute.GetKeys()){} or something like that.
Galo
Member
166 Points
50 Posts
User Controls IEnumerator on HtmlTextWriterAttribute Constants
May 05, 2006 03:43 PM|LINK
Hope i got that right,
HtmlTextWriterAttribute has Constants right, like all posible options to put as attributes within a HtmlTextWriter, i can use them whoopy, but how do i collect them, i can't fiund it, i tried Enumerating it through the IEnumerat interface and converting it to a frase like
this.attribCollection[keys.Current.ToString()]
I'm just working with asp.net and i'm just trying to figure things out, where do i have to look in the framework to get this awnser, i tried F1 a 100 times on attributes comming from the intellisense but theres so much in it...., so i decided maybe somebody here coult tell me that.
Thanks to all,
ravikatha
Contributor
2136 Points
348 Posts
Re: User Controls IEnumerator on HtmlTextWriterAttribute Constants
May 07, 2006 07:03 PM|LINK
I guess, you are trying to find out the names and values of all attributes defined by the HtmlTextWriterAttribute. If it is so, below is a piece of code.
foreach (int val in Enum.GetValues (HtmlTextWriterAttribute)) { HtmlTextWriterAttribute enumVal = (HtmlTextWriterAttribute) val; string enumName = enumVal.ToString (); }Hope this helps
Regards
Ravi
Galo
Member
166 Points
50 Posts
Re: User Controls IEnumerator on HtmlTextWriterAttribute Constants
May 08, 2006 06:36 AM|LINK
Ehaa, thanks so much i'm waiting for this awnser for 3 days now
i was looking for this frase
int val in Enum.GetValues (HtmlTextWriterAttribute))
Why i didn't find the solution in the framework or on msdn is they dont "serve" type based searching, nop instead object and class browser which force you to go in deep to get the actual solution, waaaaay to much information for me.
thing like the Enum Getvalues(Collection), would have figured that out on my own, and why, don't know i was searching for somehting more like
foreach(int val in HtmlTextWriterAttribute.GetKeys()){} or something like that.
Cheers,
Galo
Galo
Member
166 Points
50 Posts
Re: User Controls IEnumerator on HtmlTextWriterAttribute Constants
May 08, 2006 11:28 AM|LINK
CS0118: 'System.Web.UI.HtmlTextWriterAttribute' is a 'type' but is used like a 'variable'
:(
Galo
Member
166 Points
50 Posts
Re: User Controls IEnumerator on HtmlTextWriterAttribute Constants
May 08, 2006 06:07 PM|LINK
ravikatha
Contributor
2136 Points
348 Posts
Re: User Controls IEnumerator on HtmlTextWriterAttribute Constants
May 09, 2006 04:42 AM|LINK
I am so sorry for the typo.
The line
should be