how can I figure out from within a server control wheather it is being used in design mode or in runtime ?
View Complete Post
I have created a server control consisting of a TextArea and a div under it. My goal is to create my own asp:TextArea type control. the div is for a Character count of the text area and seems to work ok but i added a CharacterCountVisible property to the control that is always returning true. See Proptery definition below
<Bindable(False), Category("Appearance"), DefaultValue("True"), Localizable(True)> Property CharacterCountVisible() As Boolean Get Return _CountBoxVisible End Get Set(ByVal value As Boolean) _CountBoxVisible = value End SetEnd Property
Note the _CountBoxVisible variable is define inside the class as :
Dim _CountBoxVisible as Boolean = True
What I am trying to do is give the user/coder the option to show/utilize the char count feature. Can make it disappear with textarea1.CharacterCountVisible = False but setting it to true will not make it display.
What am i missing
I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.
Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
' Get file name Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload) Dim UploadFileName As String = uploadAvatar.PostedFile.FileName If UploadFileName = "" Then ' There is no file selected args.IsValid = False Else Dim Extension As String = UploadFileName.Substring(UploadFileName.L
Hi to all,
I have some things that I want to know. I am right now using a free asp.net webhosting ("somee.com"). The problem is that when I am visiting a page, there's a tendency that values stored in my session variables are lost. Therefore, it causes an error when the requested page is loaded.
1. I am thinking of using sessionState mode="SqlServer". Will it solve my problem?
Actualy Im working on it but Im having problems when connecting to the sql database.
2. Is that a problem in the webhost?
3. Do free webhosting sites provide allow session state in the sql server?. Because ive tried it locally into my computer and error say's i should intall the ASP.NET Session State SQL Server version 2.0 or above.
i am new to technology so go easy on this post
according to what i read from web there are 3 type of custom server controls
i found video tutorial for superclass custom server control but couldnt find video tutials for other 2.
please forward me link for composite and rendered custom server controls video tutorial
i am new to forum and technology so please go easy
according to what i read from web there 3 types of custom server controls
i found video tutorial to create and use superclass custom control in your project (extending dropdown control functionality)
i am trying to search video tutorial for other 2 types .please help me.
I want to use an image inside a Custom Web server control !
Do I need to use Web.resources ? if so , how to do ?
In this new column, Brian Randell begins his long look at how to extend and enhance Visual Studio Team System.
Brian A. Randell
MSDN Magazine January 2007
MSDN Magazine April 2001
I have created my first Custom asp.net server control.But i think such projects probably contains AssemblyInfo file.But i am missing that. When i created project that file was not added.
I am working on VS 2008 Team System Edition,with VB.NET language.How to get that file ?