|
Well, you got your answer then, didn't you ?
What were you hoping to do with this 'webcontrol' ??
From MSDN:
Serves as the base class that defines the methods, properties and events common to all controls in the System.Web.UI.WebControls namespace.
It's a base class. It's empty contstructor is protected, although it has one that is public:
WebControl Constructor (HtmlTextWriterTag)
Initializes a new instance of the WebControl class using the specified HTML tag.
It took be 5 seconds to find all this out with google.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks for your response.
I found about it on MSDN but I dont want to pass HtmlTextWriterTag.
Will passing this as a parameter and passing nothing make a difference?
|
|
|
|
|
I can only imagine that it would end in disaster. If you're creating your own control, just derive from UserControl, which is what you should do anyhow.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
WebControl 's parameterless constructor is protected , meaning that is only accessable to classes deriving from WebControl , which UserControl does not.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Thanks for response.
That's why I worte like this:
public class MyControl: System.Web.UI.WebControls.WebControl
instead of
public class MyControl: System.Web.UI.UserControl
I was able to get rid of the error. I am not sure if that's the correct solution. By default, ascx control inherits from System.Web.UI.UserControl
|
|
|
|
|
I have an application that works fine on the developer server. This application has infragistics controls. When I move this application as it is to the production server, those infragistics buttons wouldn't respond. I checked the dlls, they are present in bin folder. I have no clue what was wrong. Does anyone have any suggestions to fix this problem?
Thanks.
|
|
|
|
|
I've had to work on a project using those controls. I ripped them out ASAP, they are crap. They also frequently break my exe. I'd recommend contacting them, and asking how to make their stupid buttons work.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Now I got them worked. In the IIS server I have to create a virtual directory ig_common which holds all the javascipts and graphic files for infragistics.
|
|
|
|
|
I am able to load a txt file. The first 5 line of the txt file are always the same. They are:
% PART NO. AZ-2S_SUP_AUTO_CHALK_WP
G90
G92
G93
F8.
I would like a way to automatically delete the first line when I load this file and replace it with the word OPEN. Does anybody have a simple way of doing this?
Please Help me.
Darren
|
|
|
|
|
You'll need to read the rest of the file, then overwrite it so that you replace the first line, as you want.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I am trying to find code to autofill a dropdownlist as the user types in a Web Form (not a Windows Form) using C#. For example if the user types b the first word in the list that starts with b will come up. When the user types the next letter like r the first word that starts with br will show up. Right now the way it works is when the user types the r it goes to the first word that starts with r losing the b. Thanks for any help on this.
|
|
|
|
|
I found something in VB.Net. You may get some clues from it.
http://www.dotnetjohn.com/articles/articleid132.aspx
|
|
|
|
|
i wrote a simple line of code that retrives a value from a static XML file but my problem that it returns diffrent result every time it runs, the line is:
string asd = VoteData.DocumentElement.ChildNodes[1].ChildNodes[1].InnerText;
maybe that happen coz the file is not completely loaded , i'm using C# but i don't found any method that let me know if the file is completely loaded or not, i know that theres a function in javascript which is : readyState that do the job, but i can't found any in C#, can anyone help ?
thanx in advance.
|
|
|
|
|
If your XML file does not change, then I don't see why this would differ. You should really be using an XPath to find the node you want though, this way is incredibly clunky.
If the document was not fully loaded, it would not be valid XML, and none of this would work.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi,
I have 2 questions regarding bitmaps:
1)I have a small bitmap (16/16 pixels) that I'm using in my application.
I need to set its background to transparent.
When I use the code
MyBitmap.MakeTransparent(Color.White);
all the white pixels become blue instead of transparent!!!
Does anyone know whats going on here?
2) Is it possible to save a bitmap as part of the C# project and open it this way instead of installing the bitmap file and opening in the file way:
string bmpPath = @"c:\MyBitmap";
Bitmap MyBitmap= new Bitmap(bmpPath);
Thanks.
avivhal
|
|
|
|
|
It is highly recommended that white and black not be used as transparent colors. Microsoft recommends using magenta (255, 0, 255) or green (0, 255, 0).
I don't know that transparent white is the cause of your problem, though. Worth a try anyway, that is, until Heath comes along and gives you a better answer than I can.
Tech, life, family, faith: Give me a visit.
Judah Himango
|
|
|
|
|
Thanks, but I tried gray before and got same result.
avivhal
|
|
|
|
|
1. TRy creating an imageattributes class instance and setting the transparent key on that. I didn't know bitmaps had a MakeTransparent method, I've never used it.
2. Yes, absolutely. Just make the bitmap part of your project, then change it's properties so that it is an embedded resource. Then you can load it as a resource, using code like this:
private static Bitmap GetImageFromResources(string name)<br />
{<br />
Assembly a = Assembly.GetExecutingAssembly(); <br />
<br />
string my_namespace = a.GetName().Name.ToString();<br />
<br />
Bitmap image = new Bitmap(a.GetManifestResourceStream(my_namespace + "." + name));<br />
<br />
return image;<br />
}
Put that functions somewhere and call it to load your bitmaps. The name can need qualification by namespace, depending on where in the project it is.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks.
I changed the code a bit since it did not work properly.
My code is:
public static Bitmap GetImageFromResources(string name)
{
// get a reference to the current assembly
System.Reflection.Assembly a = Assembly.GetExecutingAssembly();
string my_namespace = a.GetName().Name.ToString();//not needed since return assembly name
string[] ResourceNames = a.GetManifestResourceNames();
string ImageFullName="";
for(int i=0 ; i < ResourceNames.Length ; i++)
if(ResourceNames[i].ToUpper().IndexOf(name.ToUpper()) != -1)
{
ImageFullName = ResourceNames[i]; break;
}
Bitmap image =
new Bitmap(a.GetManifestResourceStream(/*my_namespace + "." +*/ ImageFullName));
return image;
}
Problem was that a.GetName().Name.ToString(); does not return the name space in which the code is running but rather the assembly name.
Thanks again.
avivhal
|
|
|
|
|
Hello
I need help for the following:
1)Retrieve DSN list in Combo Box
2)After Selecting the DSN,select the Database
3)After Selection of Database,it list down all tables and their associated fields
-Is it possible?kindly guide me
Thanks
-adnan
|
|
|
|
|
|
Is it possible to see how many monitors there are connected to your pc and how to draw on them with second display not as extended desktop.
The goal is to see a application in fullscreen on second monitor but if the program stops that the screen turns black.
I have found some GDI examples for C++ but not what i was expecting. I want to enable and disable the second display through code and not by using a application or a windows setting.
Please help me,
Squall Blade
|
|
|
|
|
Lookup the Screen class in the .NET Framework SDK. You can get the number of display devices using Screen.AllScreens.Length , and you can draw on a specific screen by using its Screen.Bounds to draw into.
For examples click "Search comments" directly above this message board to search this forum. We've discussed this many times in the past and I remember even posting a sample or two. It's really not hard to figure out, however, if you read the .NET Framework SDK documentation.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello all happy coders!
I have a problem and would be very happy to get some help.
I have a tabcontrol that I want to make transparent. I can make the tabs transparent but not the tabcontrol. There is no propertie on the tabcontrol that I can use to set the background. HELP!
Thanks!
Best regards!
/Erik
|
|
|
|
|
We have an n tiered app with a class that represents objects in our system, and a lot of the properties for that class are sub entities that we define, and so on. Our client is writing a web service that sends us XML, which we use to update our objects, and we're using an approach where we create lists of properties and use reflection in a central method, so that if I pass in an object of type A, and a string that is "B.C.D.E", and an object that is, for example, set to be true, the reflection code gets the B property of A, then uses the returned object to get the C property and so on, until it has D. Then it works out the type of the object being passed in, converts the XML string to that type, and finally uses reflection to set D.E = true.
This all works pretty well, but we have a property which is indexed by an enum, and values for setting properties for the resultant object, for each of the enum values. So, my input string is something like B.C[MyEnum.D].E and once I have an object of type B, I need to get the object returned by referencing the property C, passing in the enum value of D. Does that make sense ? I hope so. My problem is that I can't figure out how, if I have an object, of type B, and "C", "MyEnum" and "D" as string arguments, I can use reflection to end up with the final property, so I can proceed to set it's E property.
In other words, if I have an object, how do I use reflection to retrieve a property which is indexed by an enum value ?
Thanks for any help.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|