Home All Groups Group Topic Archive Search About

Freetextbox.com question

Author
12 Apr 2005 6:26 AM
Fowkester
All,

Anyone here used freetextbox with ASP.NET (VB)

If so would anyone mind helping me with this very dumb question..

http://www.freetextbox.com/forums/ShowPost.aspx?PostID=3716

Thanks in advance

Fowkester

p.s Also thanks to anyone that can recommend any further asp.net newsgroups

Author
12 Apr 2005 12:41 PM
Karl Seguin
mark,
you have something like <FTB:FreeTextBox id="FreeTextBox1" runat="Server" />
in your aspx page.

you have a codebehind page, with the following:

PrivateSub SaveButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SaveButton.Click
    outputlabel.text = freetextbox1.text
EndSub


in other words, in your codebehind you are using the "Freetextbox1"
variable....you need to associate this variable with the <FTP:FreeTExtBox
you have in the aspx page...them sharing the same ID isn't enough....you
need to declare it in your codebehind:

protected FreeTextBox1 as FreeTextBoxControls.FreeTextBox

this links your <FTB:Freet...   so the freetextbox1 variable in codebehind..

karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
Show quoteHide quote
"Fowkester" <mail_at@_markfowkes.co.uk> wrote in message
news:oSJ6e.19114$il.9158@newsfe5-win.ntli.net...
> All,
>
> Anyone here used freetextbox with ASP.NET (VB)
>
> If so would anyone mind helping me with this very dumb question..
>
> http://www.freetextbox.com/forums/ShowPost.aspx?PostID=3716
>
> Thanks in advance
>
> Fowkester
>
> p.s Also thanks to anyone that can recommend any further asp.net
newsgroups
>
>
>
>
Author
13 Apr 2005 9:25 AM
Fowkester
Hi Karl

Thanks for replying to my post, but im still having problems even though your post moved me forward.

I had forgotten to add the DLL as a referance in my project, Now I have done this and my code matchs what you suggested.

CODE BEHIND

------------

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim FreeTextBox1 As FreeTextBoxControls.FreeTextBox

outputlabel.text = FreeTextBox1.Text()

End Sub

------------

SNIPS OF CODE IN FRONT

------------

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

<FTB:FreeTextBox id="FreeTextBox1" runat="Server" />

------------

FreeTextBox1 gives me "auto sense" so I know its registered correctley, however the .text property is blank even though there is text in the box

Any help id appricate greatly!

Regards

Mark

Show quoteHide quote
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:O0zKkz1PFHA.1176@TK2MSFTNGP12.phx.gbl...
> mark,
> you have something like <FTB:FreeTextBox id="FreeTextBox1" runat="Server" />
> in your aspx page.
>
> you have a codebehind page, with the following:
>
> PrivateSub SaveButton_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles SaveButton.Click
>    outputlabel.text = freetextbox1.text
> EndSub
>
>
> in other words, in your codebehind you are using the "Freetextbox1"
> variable....you need to associate this variable with the <FTP:FreeTExtBox
> you have in the aspx page...them sharing the same ID isn't enough....you
> need to declare it in your codebehind:
>
> protected FreeTextBox1 as FreeTextBoxControls.FreeTextBox
>
> this links your <FTB:Freet...   so the freetextbox1 variable in codebehind..
>
> karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/ - New and Improved (yes, the popup is
> annoying)
> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> come!)
> "Fowkester" <mail_at@_markfowkes.co.uk> wrote in message
> news:oSJ6e.19114$il.9158@newsfe5-win.ntli.net...
>> All,
>>
>> Anyone here used freetextbox with ASP.NET (VB)
>>
>> If so would anyone mind helping me with this very dumb question..
>>
>> http://www.freetextbox.com/forums/ShowPost.aspx?PostID=3716
>>
>> Thanks in advance
>>
>> Fowkester
>>
>> p.s Also thanks to anyone that can recommend any further asp.net
> newsgroups
>>
>>
>>
>>
>
>
Author
13 Apr 2005 12:15 PM
Karl Seguin
The way you've FreeTextBox1 in code-behind, it's scoped to the button_click
event...instead it must be scopped to the entire class:

public class Somehing
  inherits System.Web.UI.Page

  protected FreeTextBox1 as FreeTextBoxControls.FreeTextBox
  Sub Page_Load
    ...
  end sub

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
    outputlabel.text = FreeTextBox1.Text()
  End Sub
end class


You might want to invest some time learning asp.net more

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

"Fowkester" <mail_at@_markfowkes.co.uk> wrote in message
news:iA57e.11070$C2.8576@newsfe3-win.ntli.net...
Hi Karl
Thanks for replying to my post, but im still having problems even though
your post moved me forward.
I had forgotten to add the DLL as a referance in my project, Now I have done
this and my code matchs what you suggested.
CODE BEHIND
------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim FreeTextBox1 As FreeTextBoxControls.FreeTextBox
outputlabel.text = FreeTextBox1.Text()
End Sub
------------
SNIPS OF CODE IN FRONT
------------
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls"
Assembly="FreeTextBox" %>
<FTB:FreeTextBox id="FreeTextBox1" runat="Server" />
------------
FreeTextBox1 gives me "auto sense" so I know its registered correctley,
however the .text property is blank even though there is text in the box
Any help id appricate greatly!
Regards
Mark
Show quoteHide quote
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:O0zKkz1PFHA.1176@TK2MSFTNGP12.phx.gbl...
> mark,
> you have something like <FTB:FreeTextBox id="FreeTextBox1" runat="Server"
/>
> in your aspx page.
>
> you have a codebehind page, with the following:
>
> PrivateSub SaveButton_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles SaveButton.Click
>    outputlabel.text = freetextbox1.text
> EndSub
>
>
> in other words, in your codebehind you are using the "Freetextbox1"
> variable....you need to associate this variable with the <FTP:FreeTExtBox
> you have in the aspx page...them sharing the same ID isn't enough....you
> need to declare it in your codebehind:
>
> protected FreeTextBox1 as FreeTextBoxControls.FreeTextBox
>
> this links your <FTB:Freet...   so the freetextbox1 variable in
codebehind..
>
> karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/ - New and Improved (yes, the popup is
> annoying)
> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> come!)
> "Fowkester" <mail_at@_markfowkes.co.uk> wrote in message
> news:oSJ6e.19114$il.9158@newsfe5-win.ntli.net...
>> All,
>>
>> Anyone here used freetextbox with ASP.NET (VB)
>>
>> If so would anyone mind helping me with this very dumb question..
>>
>> http://www.freetextbox.com/forums/ShowPost.aspx?PostID=3716
>>
>> Thanks in advance
>>
>> Fowkester
>>
>> p.s Also thanks to anyone that can recommend any further asp.net
> newsgroups
>>
>>
>>
>>
>
>
Author
13 Apr 2005 2:16 PM
Fowkester
Karl

Thanks for the help its working!! :)

Im very new to asp.net just been on my first course and im ploughing through
books.

Thanks very much for your time - you have helped me to understand!

Regards

Mark

Show quoteHide quote
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%23K4GIKCQFHA.3704@TK2MSFTNGP12.phx.gbl...
> The way you've FreeTextBox1 in code-behind, it's scoped to the
> button_click
> event...instead it must be scopped to the entire class:
>
> public class Somehing
>  inherits System.Web.UI.Page
>
>  protected FreeTextBox1 as FreeTextBoxControls.FreeTextBox
>  Sub Page_Load
>    ...
>  end sub
>
>  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
>    outputlabel.text = FreeTextBox1.Text()
>  End Sub
> end class
>
>
> You might want to invest some time learning asp.net more
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/ - New and Improved (yes, the popup is
> annoying)
> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> come!)
>
> "Fowkester" <mail_at@_markfowkes.co.uk> wrote in message
> news:iA57e.11070$C2.8576@newsfe3-win.ntli.net...
> Hi Karl
> Thanks for replying to my post, but im still having problems even though
> your post moved me forward.
> I had forgotten to add the DLL as a referance in my project, Now I have
> done
> this and my code matchs what you suggested.
> CODE BEHIND
> ------------
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Dim FreeTextBox1 As FreeTextBoxControls.FreeTextBox
> outputlabel.text = FreeTextBox1.Text()
> End Sub
> ------------
> SNIPS OF CODE IN FRONT
> ------------
> <%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls"
> Assembly="FreeTextBox" %>
> <FTB:FreeTextBox id="FreeTextBox1" runat="Server" />
> ------------
> FreeTextBox1 gives me "auto sense" so I know its registered correctley,
> however the .text property is blank even though there is text in the box
> Any help id appricate greatly!
> Regards
> Mark
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:O0zKkz1PFHA.1176@TK2MSFTNGP12.phx.gbl...
>> mark,
>> you have something like <FTB:FreeTextBox id="FreeTextBox1" runat="Server"
> />
>> in your aspx page.
>>
>> you have a codebehind page, with the following:
>>
>> PrivateSub SaveButton_Click(ByVal sender As System.Object, ByVal e As
>> System.EventArgs) Handles SaveButton.Click
>>    outputlabel.text = freetextbox1.text
>> EndSub
>>
>>
>> in other words, in your codebehind you are using the "Freetextbox1"
>> variable....you need to associate this variable with the <FTP:FreeTExtBox
>> you have in the aspx page...them sharing the same ID isn't enough....you
>> need to declare it in your codebehind:
>>
>> protected FreeTextBox1 as FreeTextBoxControls.FreeTextBox
>>
>> this links your <FTB:Freet...   so the freetextbox1 variable in
> codebehind..
>>
>> karl
>>
>> --
>> MY ASP.Net tutorials
>> http://www.openmymind.net/ - New and Improved (yes, the popup is
>> annoying)
>> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
>> come!)
>> "Fowkester" <mail_at@_markfowkes.co.uk> wrote in message
>> news:oSJ6e.19114$il.9158@newsfe5-win.ntli.net...
>>> All,
>>>
>>> Anyone here used freetextbox with ASP.NET (VB)
>>>
>>> If so would anyone mind helping me with this very dumb question..
>>>
>>> http://www.freetextbox.com/forums/ShowPost.aspx?PostID=3716
>>>
>>> Thanks in advance
>>>
>>> Fowkester
>>>
>>> p.s Also thanks to anyone that can recommend any further asp.net
>> newsgroups
>>>
>>>
>>>
>>>
>>
>>
>
>