Click here to Skip to main content
15,914,391 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Why cant I use RecordCount of recordset Pin
Philip Patrick3-Apr-02 20:24
professionalPhilip Patrick3-Apr-02 20:24 
GeneralRe: Why cant I use RecordCount of recordset Pin
SimonS4-Apr-02 7:09
SimonS4-Apr-02 7:09 
GeneralRe: Excellent Free Technical eBooks Pin
Philip Patrick3-Apr-02 20:29
professionalPhilip Patrick3-Apr-02 20:29 
GeneralRe: Excellent Free Technical eBooks Pin
James T. Johnson3-Apr-02 22:01
James T. Johnson3-Apr-02 22:01 
QuestionHow to inherit a web control designer from ReadWriteControlDesigner Pin
2-Apr-02 19:21
suss2-Apr-02 19:21 
QuestionHow to provide a toolboxbitmap to a Web Server Control? Pin
2-Apr-02 19:09
suss2-Apr-02 19:09 
AnswerRe: How to provide a toolboxbitmap to a Web Server Control? Pin
Andy Smith3-Apr-02 10:12
Andy Smith3-Apr-02 10:12 
GeneralThanx a lot, but I think you made sth ambiguous Pin
4-Apr-02 11:46
suss4-Apr-02 11:46 
First, if either in Visual C# or Visual Basic, you should not have to name the bitmap in "namespace+classname" format, because once you add a image or other non-XML resource into the project,the computed manifest res name of the resouse would be "rootnamespace.xxxxxxx", in other words we don not need add namespace manually.

Second, and this is the most important, ToolboxBitmapAttribute will set the icon as file or assembly resource, although you mentioned assign a bitmap resource with the same assembly name as the control, the usage of "typeof(Bitmap)" is wrong, because the attribute need specify an assembly type or name where can find the icon. The type is the control itself, we already embed a bitmap with the same assembly name as it.

Now, I made it. Thank you inprised me. and the following is the steps in Visual Studio.Net.

  1. Create a WebControl Library project in VS.Net;

  2. Add a WebCustomControl as name you specified, for example "MyCtrl1";

  3. Add a 16*16 bitmap named "MyCtrl1.bmp" into the project, the name should be same as the classname of the control.

  4. Set Select "MyCtrl1.bmp" in Solution Explorer and set File Property "Build Action" to Embedded Resource;

  5. Modify the source code of the control like following:


namespace mylib
{
...
[
...
ToolboxBitmap(typeof(MyCtrl1)),
...
]
public class MyCtrl1 : WebControl ...
{
...
}

}

Then build the project.

Charles Chen
GeneralRe: Thanx a lot, but I think you made sth ambiguous Pin
Andy Smith4-Apr-02 11:50
Andy Smith4-Apr-02 11:50 
GeneralRe: Thanx a lot, but I think you made sth ambiguous Pin
James T. Johnson4-Apr-02 12:01
James T. Johnson4-Apr-02 12:01 
Generalwebsphere and ASP Pin
Pradhip2-Apr-02 7:15
Pradhip2-Apr-02 7:15 
GeneralRefresh custom server control Pin
Ignacio Varas2-Apr-02 2:09
Ignacio Varas2-Apr-02 2:09 
Questionweb service??? Pin
Leesen2-Apr-02 0:54
Leesen2-Apr-02 0:54 
General<asp:xml> snag - this is killing me! Pin
1-Apr-02 10:30
suss1-Apr-02 10:30 
GeneralRe: <asp:xml> snag - this is killing me! Pin
MS le Roux1-Apr-02 19:48
MS le Roux1-Apr-02 19:48 
GeneralRe: <asp:xml> snag - this is killing me! Pin
Gerald Schwab1-Apr-02 19:55
Gerald Schwab1-Apr-02 19:55 
QuestionASP.Net custom control assembly (DLL) location? Pin
Stan Shannon1-Apr-02 4:50
Stan Shannon1-Apr-02 4:50 
AnswerRe: ASP.Net custom control assembly (DLL) location? Pin
James T. Johnson2-Apr-02 1:26
James T. Johnson2-Apr-02 1:26 
AnswerRe: ASP.Net custom control assembly (DLL) location? Pin
Todd Smith14-May-02 14:14
Todd Smith14-May-02 14:14 
AnswerRe: ASP.Net custom control assembly (DLL) location? Pin
Todd Smith14-May-02 15:32
Todd Smith14-May-02 15:32 
GeneralRe: ASP.Net custom control assembly (DLL) location? Pin
Stan Shannon14-May-02 16:48
Stan Shannon14-May-02 16:48 
GeneralCGI question... Pin
Philip Patrick31-Mar-02 2:10
professionalPhilip Patrick31-Mar-02 2:10 
GeneralRe: CGI question... Pin
31-Mar-02 10:54
suss31-Mar-02 10:54 
GeneralRe: CGI question... Pin
Philip Patrick31-Mar-02 11:13
professionalPhilip Patrick31-Mar-02 11:13 
GeneralRe: CGI question... Pin
alex.barylski31-Mar-02 23:30
alex.barylski31-Mar-02 23:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.