CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 3/29/2004 7:54:53 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 19 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
abarsami
Asp.Net User
User control question - code posted3/29/2004 7:54:53 AM

0/0

I have signup.ascx

html view
<asp:TextBox id="txtBox" runat="server"></asp:TextBox>
<asp:TextBox id="txtBox2" runat="server"></asp:TextBox>

code behind
Public Property txtField() As String
Get
Return txtBox.Text
End Get
Set(ByVal Value As String)
End Set
End Property
Public Property txtField2() As String
Get
Return txtBox2.Text
End Get
Set(ByVal Value As String)
End Set
End Property

I have signup.aspx

I dragged the control over to this page.
I added a button to this page called "button"
When I click on the button -- I want to display the textboxes values.

I have on button click:

Dim oClass As New HWSignup
Response.Write(oClass.txtField & oClass.txtField2)

But I get an error. Am I doing this right.
darbhas
Asp.Net User
Re: User control question - code posted3/29/2004 1:38:40 PM

0/0

In your aspx codebehind are loading the user control dynamically or have u defined the usercontrol tag in .aspx file. If you have the user control tag somewhat like this in your .aspx file -
<SignUp:HWSignup id='oClass' runat="server">
then in ur codebehind, u don't have to create a new object oClass for the usercontrol HWSignup , instead u have to declare it globally as -
 Protected oClass As HWSignup 


HTH

abarsami
Asp.Net User
Re: User control question - code posted3/29/2004 3:51:20 PM

0/0

I put
Protected WithEvents HWSignup1 As HWSignup
in the aspx page. Now I don't get an error but it doesn't get the value either. It's blank.

In code behind of aspx page.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Write(HWSignup1.txtField())
Response.Write(HWSignup1.txtField2())
End Sub


abarsami
Asp.Net User
Re: User control question - code posted3/29/2004 3:55:13 PM

0/0

It works now. thanks
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Sams Teach Yourself C# Web Programming in 21 Days Authors: Philip Syme, Peter Aitken, Pages: 535, Published: 2001
Stealing the Network: How to Own the Box Authors: Ryan Russell, Jeff Moss, Pages: 448, Published: 2003
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Professional Community Server Authors: Wyatt Preul, Keyvan Nayyeri, Jose Lema, Jim Martin, Pages: 311, Published: 2007
ASP.NET: Tips, Tutorials, and Code Authors: Scott Mitchell, Pages: 878, Published: 2002
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007

Web:
User control question 2) You posted code for "blank.ascx.cs", but where is the ASCX file? 3) You needn 't register the same user control file (blank.ascx) twice. ...
To Code or not To Code: Silverlight 2: Custom Controls vs. User ... Apr 11, 2008 ... This post is different than my other Silverlight posts as I'm not ... With the custom control vs. user control question I went to what is ...
User Control question their defaults yet in the User Control and all the properties are blank. So my question is, where is the best place to put the code that ...
Basic Question: Accessing Umbraco content from a UserControl using ... Sorry to drag up a solved post with a stupid question, ... and I'm really excited about accessing Umbraco data from inside a user control! ...
Question: User control shows up at bottom / can't "draw" it - ASP ... Re: Question: User control shows up at bottom / can't "draw" it. Posted: 07-08- 2003, 09:09 PM. The only way to make my VB.NET user control ...
Question about deploy the user control with infragistics component ... Question about deploy the user control with infragistics component. Last post 12 -19-2008 16:11 by [Infragistics] Vince McDonald. 4 replies. ...
Question Inherit usercontrol - Visual Basic .NET Forums Nov 25, 2008 ... Also have a look at the Designer generated code for UserControl template, ... codes for code blocks etc (present the problem/post properly ) ...
User Control and Namespace question - bytes Just new at this, Vs 2005 Vb.net Created a new Windows control library User control project. Only 1 file UserControl1.vb No code or object ...
Referenced namespaces missing from generated code behind for ... Add one Silverlight User Control to Silverlight Application and named it ... your question, please click on "Mark as Answer" on this post. ...
How to pass a value from User Control to the Page So my code for user control will look like following ... Creating dynamic image from text posted on 12/21/2008 6:12:05 AM ...

Videos:
RE : CIA Mind Control - MK Ultra mind control program Thanks to : http://www.youtube.com/user/LightWarrior2 ---------------------------------------- NEW WORLD ORDER COMMUNITY - ORKUT 2.815 ...
How to protect yourself from viruses Rate|Comment|Subscribe Read F.A.Q before posting an "Ask" comment. Video information: http://www.avg.com http://www.avg.com/download-trial ...
Online Coupon Code http://www.EscapeTheCycle.com Online Coupon Code Online retailers often refer to Internet Coupons as "coupon codes," "promotional codes ...
3G/HD/SD/Analog Test Signal and Sync Pulse Generator ... http://www.ensembledesigns.com/products/brighteye/be57 BrightEye 57 is a genlockable sync generator and test signal generator that can be used as ...
CaptionMaker MacCaption CPCweb.com closed caption, closed captions, Captionmaker, CPC, closed captioning, captioning, maccaption, caption mac, www.cpcweb.com , cpcweb
p6apclps #52 Perl 6 Apocalypse http://www.perlfoundation.org/perl6 - - and compiler. RFC 309: Allow keywords in sub prototypes This RFC is rejected only because it doesn't go ...
Using ROSE to Mitigate Performance Trade-offs Google TechTalks April 03, 2006 Daniel Quinlan ROSE is a tool for building source-to-source transformation tools for the optimization of C ...
FileCopyProgressbar (Show the Progress of copying file form Step 1 : download the control from the attachment Step 2 : Install the control into visual studio environment Step 3 : Place the control in ...
Core Patterns for Web Permissions Google TechTalks July 19, 2006 Tyler Close Visiting Scientist Hewlett-Packard Laboratories Mr. Close is a researcher and developer ...
p6apclps #81 Perl 6 Apocalypse http://www.perlfoundation.org/perl6 - - should be on by default 160 acc Function-call named parameters (with compiler optimizations) 168 abb ...




Search This Site:










testing tools .net

setting up a subdomain

asp.net background process

converting microsoft example to c#

linq question : can only enumerate once

from c# tp vb.net

parsing parameters that were passed via the url from one page to the next

trying to gain respect for asp.net

asp.net 2.0 page object model ?

newbie problem: server error

how to configure web.config

can't see why this is nott working...

problem in ---email validation using regular expression in asp.net 2.0

image manipulation problem

and response.redirect question

crm regarding with programming

how do you develop neat designs from scratch like those starter templates?

windows icons free to use?

launch a new ie window

initialize directoryinfo object to the current directory.

looking for asp.net calendar/appt. based recurring events source code in vb

the reason that "app_offline.htm" auto is generated

request.form in an asp.net field

is this connection closed properly?

formatting date/time from access via a datareader

displaying images from db

sending mails from a webpage in c#

compilation error

search in a dataset or dataview

question on freeing objects

  Privacy | Contact Us
All Times Are GMT