ASP.NET: HtmlInputText = Nothing

M

Ma³y Piotruœ

Hello,
(I am sorry for my English - it is not my native language.)
I am learning .NET. Could you help me please with the following
problem?
I created .aspx page with a HTML control:
<input id=CustomersType name=CustomersType type=hidden runat=server>
and I made declaration in behind-code:
Protected WithEvents CustomersType As
System.Web.UI.HtmlControls.HtmlInputHidden
and the assignment instruction in Page.Load:
CustomersType.Value = ...
Unfortunately CustomersType = Nothing (in QuickWatch), so there's an
error in the assignemt line.
Could you help me please how to correct this - how to rewrite this
code.
Thank you very much.
(MP)
 
K

Ken Cox - Microsoft MVP

Hi,

Should you be using New?

Protected WithEvents CustomersType As New _
System.Web.UI.HtmlControls.HtmlInputHidden

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top