473,804 Members | 4,288 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

another sleepless night- cust control event not firing

hello folks, when i added this custom control to my webform along with
a submit button and while debugging i found that the cached 'change'
event never gets fired when i key in text in the textbox. it will only
fire if you add a 'text' attribute in the html.

if the change event doesnt fire the viewstate wont be kept for this
textbox. any idea what i am doing wrong ?....thanks
x

Imports System.Componen tModel
Imports System.Web.UI
<DefaultEvent(" OnChange")Publi c Class WebCustomContro l1
Inherits WebControls.Web Control
Event Change(ByVal sender As Object, ByVal e As EventArgs)
Property Text() As String
Get
If Not IsNothing(ViewS tate("Text")) Then
Return ViewState("Text ")
Else
Return ""
End If
End Get
Set(ByVal Value As String)
ViewState("Text ") = Value
OnChange(EventA rgs.Empty)
End Set
End Property
Protected Overridable Sub OnChange(ByVal e As EventArgs)
RaiseEvent Change(Me, EventArgs.Empty )
End Sub
Protected Overrides Sub Render(ByVal output As _
System.Web.UI.H tmlTextWriter)
output.AddAttri bute("value", Me.Text)
output.RenderBe ginTag("Input")
output.RenderEn dTag()
End Sub
End Class

Jan 5 '07 #1
0 883

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3216
by: JPM III | last post by:
I wrote a PHP script that allows me to post HTML entries to files on my server without going through FTP, yadda yadda. It works fine, and last night it updated both files properly. Today, it updated both files perfectly again, but only one file is showing up on the web. I checked the HTML files in my FTP folder, and both are updated with the new post. To double check, I copied and pasted the contents of the file as it should be and...
8
1677
by: Skwerl | last post by:
Hi guys. I've written code to embed an ICC profile in a TIFF image, and I think my IO operations are slowing things down. It is taking about a second to embed each tag in 7-meg TIFF files. Doesn't sound too bad until you try doing it to 500 files. Basically what I am doing is this: 1. Read header from image, add 12-byte tag to header, and write to a new TIFF file 2. Update all the offset pointers in other tags in TIFF header to...
6
2897
by: Andreas Schmitt | last post by:
Ok. I got the following problem. I created the following array and executed a function : CField* Spielfeld; CreatePlayField( Spielfeld ); ************************************************* ******** CreatePlayField looks like this ************ *************************************************
5
1369
by: Nick Stansbury | last post by:
Hi, Sorry for the obscure title but I'm afraid I can't think of a better way to describe what happened to one of my clerks last night. The guy was working late, made a series of changes (accross a number of tables with a dependant relationship structure - i.e. a customer linked to an order linked to an invoice linked to a payments etc.) Now when he came back this morning none of the work he did last night was still there. I'm by no means...
6
4698
by: Greg | last post by:
I am trying to change the value of one field in my query based on the value in another. If Field 1 had the text "ONACCNT" then in Feild 2 I want the date to change to today's date. Any help would be great! Thanks, Greg
3
1424
by: Ray | last post by:
Any help? I have two tables. TABLE 1 one which shows all the days of the year with (Number) (date) Each day of the year (Yes/No) TABLE 2 with reservation details with (Autonumber)
8
3362
by: daD | last post by:
I'm trying to write a small database that tracks people coming and going from a small campground. I need to have the current guests in the "current" table" and then have the ability to check them out to the "archive" table when they leave, by pushing the "check-out" button. I see the steps as follows: 1. When the check-out button is pressed, the computer should automatically add the current date into the "date checked-out" field. ...
6
1203
by: Brian L. Troutwine | last post by:
The heading comment to pprint reads: # This is a simple little module I wrote to make life easier. I didn't # see anything quite like it in the library, though I may have overlooked # something. I wrote this when I was trying to read some heavily nested # tuples with fairly non-descriptive content. This is modeled very much
3
4420
by: colleen1980 | last post by:
Hi: Can any one please help me when user select 2 dates from DDLDate1 10/09/2006 and DDLDate2 10/12/06 and the name and it close the form. I need to create multiple records in the another table on the basis of two dates like that. Data in continous form table1 ----------------------------- Data entered in continous form 10/09/2006 10/12/2006 John
0
9710
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10593
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9163
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3000
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.