When I change the asp:button in the searchbox.ascx to an asp:imagebutton I get this error:
The base class includes the field 'btnSearch', but its type (System.Web.UI.WebControls.Button) is not compatible with the type of control (System.Web.UI.WebControls.ImageButton).
Have you changed it in Visual Studio? If not, then go to searchbox.ascx.designer.cs and replace System.Web.UI.WebControls.Button with System.Web.UI.WebControls.ImageButton for 'btnSearch'
OK, Andrei, I have changed in VS: in the designer.cs to an ImageButton. No luck. I have also tried puttin the declaration in the code-behind file, no luck.
The error is about the base-class:
The base class includes the field 'btnSearch', but its type (System.Web.UI.WebControls.Button) is not compatible with the type of control (System.Web.UI.WebControls.ImageButton).
I'm not sure why you want to change it to an imagebutton. You can also change the css class for each button and add à background and remove the borders. Hope this helps.
Example: Background: url('images/button.gif') left top; Border:0;
if you made all the changes necessary, all you have to do is clean the solution. SOLVED: under build click clean solution. the squiggly line should go away after
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.