Hi guys
I'm trying to get ASP.NET to do something when someone starts typing in my
textbox, but it doesn't want to fire the codebehind!
I've got AutoPostBack set to to True on my textbox, and the following wireup
in my code-behind...
this.txtMyTextB ox.TextChanged += new System.EventHan dler(this.TextC hange);
TextChange function looks something like...
private void TextChange
{
Response.Write( "test!");
}
But when I type in the text box nothing happens! What have I missed?!
Cheers
Dan 4 3918
Try set your AutoPostBack to true.
You do realise however, this will cause the page to post back and reload.
Not a very nice user experience.
Unless you loading some other data on the page, i would suggest you use
javascript for this
"dhnriversi de" <da*@musoswire. com> wrote in message
news:BD******** *************** ***********@mic rosoft.com... Hi guys
I'm trying to get ASP.NET to do something when someone starts typing in my textbox, but it doesn't want to fire the codebehind!
I've got AutoPostBack set to to True on my textbox, and the following wireup in my code-behind...
this.txtMyTextB ox.TextChanged += new System.EventHan dler(this.TextC hange);
TextChange function looks something like...
private void TextChange { Response.Write( "test!"); }
But when I type in the text box nothing happens! What have I missed?!
Cheers
Dan
My AutoPostBack is set to True, it still doesn't work.
This is an intranet application, so I wanted to see what the speed was like
- might be okay, might not :)
Any other suggestions?
"Grant Merwitz" wrote: Try set your AutoPostBack to true.
You do realise however, this will cause the page to post back and reload. Not a very nice user experience.
Unless you loading some other data on the page, i would suggest you use javascript for this
"dhnriversi de" <da*@musoswire. com> wrote in message news:BD******** *************** ***********@mic rosoft.com... Hi guys
I'm trying to get ASP.NET to do something when someone starts typing in my textbox, but it doesn't want to fire the codebehind!
I've got AutoPostBack set to to True on my textbox, and the following wireup in my code-behind...
this.txtMyTextB ox.TextChanged += new System.EventHan dler(this.TextC hange);
TextChange function looks something like...
private void TextChange { Response.Write( "test!"); }
But when I type in the text box nothing happens! What have I missed?!
Cheers
Dan
Works fine for me:
Try attached
"dhnriversi de" <da*@musoswire. com> wrote in message
news:2C******** *************** ***********@mic rosoft.com... My AutoPostBack is set to True, it still doesn't work.
This is an intranet application, so I wanted to see what the speed was like - might be okay, might not :)
Any other suggestions?
"Grant Merwitz" wrote:
Try set your AutoPostBack to true.
You do realise however, this will cause the page to post back and reload. Not a very nice user experience.
Unless you loading some other data on the page, i would suggest you use javascript for this
"dhnriversi de" <da*@musoswire. com> wrote in message news:BD******** *************** ***********@mic rosoft.com... > Hi guys > > I'm trying to get ASP.NET to do something when someone starts typing in > my > textbox, but it doesn't want to fire the codebehind! > > I've got AutoPostBack set to to True on my textbox, and the following > wireup > in my code-behind... > > this.txtMyTextB ox.TextChanged += new > System.EventHan dler(this.TextC hange); > > TextChange function looks something like... > > private void TextChange > { > Response.Write( "test!"); > } > > But when I type in the text box nothing happens! What have I missed?! > > Cheers > > > Dan
sorry Grant.... attached? Can't see any attachments? Using the Microsoft web
reader thingy.... can you email me? dan at musoswire.com
Ta mate
"Grant Merwitz" wrote: Works fine for me:
Try attached
"dhnriversi de" <da*@musoswire. com> wrote in message news:2C******** *************** ***********@mic rosoft.com... My AutoPostBack is set to True, it still doesn't work.
This is an intranet application, so I wanted to see what the speed was like - might be okay, might not :)
Any other suggestions?
"Grant Merwitz" wrote:
Try set your AutoPostBack to true.
You do realise however, this will cause the page to post back and reload. Not a very nice user experience.
Unless you loading some other data on the page, i would suggest you use javascript for this
"dhnriversi de" <da*@musoswire. com> wrote in message news:BD******** *************** ***********@mic rosoft.com... > Hi guys > > I'm trying to get ASP.NET to do something when someone starts typing in > my > textbox, but it doesn't want to fire the codebehind! > > I've got AutoPostBack set to to True on my textbox, and the following > wireup > in my code-behind... > > this.txtMyTextB ox.TextChanged += new > System.EventHan dler(this.TextC hange); > > TextChange function looks something like... > > private void TextChange > { > Response.Write( "test!"); > } > > But when I type in the text box nothing happens! What have I missed?! > > Cheers > > > Dan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fabrício de Novaes Kucinskis |
last post by:
Hi all,
I have a combobox control, in wich I put an autocomplete code. This code is
in the TextChanged event, but when this event fires, the Text property isn't
updated yet.
For example, if the Text property is "Foo" and I press the letter "d", the
Text property when the TextChanged event runs is "Foo". Only after the
TextChanged event be processed, the KeyDown, KeyUp and KeyPress events fires
and update the Text property.
|
by: David Smith |
last post by:
What I want to be able to do:
A textbox is available that the user can enter information into.
Specifically (for the purposes of this post), the user is asked to
enter a number, and that number has an upper limit. I want to do
validation on what the user enters as they type it in.
I set up an event handler for KeyPress that restricts them from being
able to enter non-numeric characters (only allowing numbers, decimal
point, control...
|
by: Ben Fidge |
last post by:
Hi
I've got a TextBox on my WebForm with it's AutoPostback
set to true, and an event handler created for the
TextChanged event.
I would expect this event to be fired when the user types
any character into the textbox. However, the event is
only firing when the users enters text and THEN moves to
another control on the page.
|
by: Vi |
last post by:
Hello,
I want to be able to reload a DropDownList when a TextBox changes its value.
So I set the AutopostBack property of the TextBox to true and in the code
behind I do something like:
if(IsPostBack)
{
if( ((TextBox)sender).ID == "myTextBox" )
myDropDownList.DataBind();
}
|
by: Joe |
last post by:
Hello All,
I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton
(SearchButton) server controls. The user can type search text in
SearchTextBox and click SearchButton and the web server performs a database
query and displays the results. All of this works fine.
I want the user to be able to press the Enter key while the cursor is still
in SearchTextBox and have the SearchButton.Click event fire (thus performing...
| |
by: DotNetNewbie |
last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21
Days.
I am having trouble getting one of the exercises to work at the end of day 4.
Exercises:
1. Create a new multiple-form application that displays two forms when it
starts, each
with a text box. Add code to each text box’s TextChanged event (this is the
|
by: Jason Huang |
last post by:
Hi,
In my C# Windows form MyForm I have some TextBoxes.
In these TextBoxes, we have to detect if the TextChanged event occurs,
if there're changes in these TextBoxes, it will ask if we want to save the
changes when we close the form.
However, when I run the MyForm, it will fetch data from the system and put
into TextBoxes,
and this incurs the textchanged event.
But I am thinking how do I make the TextBox's TextChanged know the
|
by: Luqman |
last post by:
I have coded in Textbox_changed Event:
If CType(txtVoucherNo.Text, Long) = 0 Then
Me.DetailsView1.ChangeMode(DetailsViewMode.Insert)
Me.DetailsView1.AutoGenerateInsertButton = True
Me.DetailsView1.AutoGenerateEditButton = True
|
by: Syed81 |
last post by:
Hi All,
I have used one textbox inside datagrid's itemtemplate.During its textchanged
event i have did some calculations in code behind using add handler.I have set autopostback=true.But its textchanged event is not firing when i move to the next cell.But for another textbox in the same row it is firing.
Anybody plz give me the solution
Regards
Syed
|
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...
|
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...
| |
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |