Kevin Robinson
asked on
Control Reference
Hi
i am trying to add a control to my ASP.NET app. I have added it in the usual way through the tool box. i can paste the control on to a form and the control wotrks ok.
The problem when I am writing my code ito access properties etc it get errors saying that it is not a member of the form. I knew I was accessing the right name of the control so I tried the page and the code worked !!
I must be missing a refernece from somewhere that is stopping visual studio from accessing the control properly but not sure where!
i am trying to add a control to my ASP.NET app. I have added it in the usual way through the tool box. i can paste the control on to a form and the control wotrks ok.
The problem when I am writing my code ito access properties etc it get errors saying that it is not a member of the form. I knew I was accessing the right name of the control so I tried the page and the code worked !!
I must be missing a refernece from somewhere that is stopping visual studio from accessing the control properly but not sure where!
ASKER
I am tring to access the controls properties in the usual way Contol.property = . Visual studio does not seem to see the control so this does not bring up intilisence, but the web page works ok in the browser.
This works
HTML
======
<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxCont rols" TagPrefix="FTB" %>
<FTB:FreeTextBox id="FreeTextBox1" runat="server" ToolbarLayout="StylesMenu, |Bold,Ital ic,Underli ne,RemoveF ormat|Just ifyLeft,Ju stifyRight ,JustifyCe nter,Justi fyFull;Bul letedList, NumberedLi st,Indent, Outdent;Cr eateLink,U nlink,Inse rtImage,In sertRule|C ut,Copy,Pa ste;Undo,R edo,Print" AutoGenerateToolbarsFromSt ring="True " BreakMode="LineBreak" ButtonImagesLocation="Inte rnalResour ce" DisableIEBackButton="True" HtmlModeCss="volunteer.css " HtmlModeCssClass="voluntee r.css" ToolbarBackgroundImage="Tr ue" UpdateToolbar="False">
</FTB:FreeTextBox>
This shows an error in VS but does work
VB CODE
===========
Freetextbox1.text = "Some Text"
This works
HTML
======
<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxCont
<FTB:FreeTextBox id="FreeTextBox1" runat="server" ToolbarLayout="StylesMenu,
</FTB:FreeTextBox>
This shows an error in VS but does work
VB CODE
===========
Freetextbox1.text = "Some Text"
Declare variable FreeTextBox1 in your code behind file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...so you're missing something like:
Protected WithEvents FreeTextBox1 As FreeTextBoxControls.FreeTe xtBox
also, you do have the dll added as a reference right?
and you did "import" it to the top of the codebehind too right?...
Protected WithEvents FreeTextBox1 As FreeTextBoxControls.FreeTe
also, you do have the dll added as a reference right?
and you did "import" it to the top of the codebehind too right?...
If you can post some code to show how you are declaring the c ontrol and how you are accesing the properties, that would be great.