| | |
Dynamic Server Control event handling
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Solved Threads: 1
Hi All,
Please help me to complete the following type of event handling in asp.net with C#
My Problem is the TextChanged event is not calling or it is not properly handling.. the autopostback is working fine.. but the event handler not..
and one thing I'm using .net 1.1 version in VS2003
Please give me a suggestion
Vimal
Please help me to complete the following type of event handling in asp.net with C#
C# Syntax (Toggle Plain Text)
private TableCell CreateTextCell(string name,string id) { TableCell cell = new TableCell(); TextBox txt = new TextBox(); txt.ID = id; txt.AutoPostBack = true; txt.Text = name; txt.TextChanged += new System.EventHandler(this.txt_Changed); cell.Controls.add(txt); return cell; }
My Problem is the TextChanged event is not calling or it is not properly handling.. the autopostback is working fine.. but the event handler not..
and one thing I'm using .net 1.1 version in VS2003
Please give me a suggestion
Vimal
Last edited by vimalfor5; Nov 24th, 2008 at 12:11 pm. Reason: mistake correction
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Solved Threads: 1
Hi Serkan,
The code structure is like
PageLoad -> above method ->
The code structure is like
PageLoad -> above method ->
c# Syntax (Toggle Plain Text)
protected void Text_Changed(object sender,EventArgs e) { TextBox t1 =null; t1 = (TextBox)sender; ...... ...... }
Last edited by vimalfor5; Nov 24th, 2008 at 5:32 pm.
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 137
i believe when you are creating the controls dynamically like that, the control is not there that signaled the event
http://gregmckinley.com/cs/blog/arch.../09/29/27.aspx
http://gregmckinley.com/cs/blog/arch.../09/29/27.aspx
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 118
ok, there is one big difference between .net framework 1.1 and 2.0, in 1.1 you have to wire the events to the methods in the page init event handler. Tell me what exactly you want to do with these table cells. Watch the execution order of events during the page cycle. that is the most typical problem for such issues.
Due to lack of freedom of speech, i no longer post on this website.
•
•
Join Date: Sep 2007
Posts: 10
Reputation:
Solved Threads: 1
Hi
Actually i want to update some other cells + Some calculations also there whenever the dynamically created text field changed, thats the main thing i want to do. Coz the each and every cell in that page is dynamically created. I Have tried alot to do that Event handling.
I dnt want to use Ajax features in this app.
i knows the limitations of 1.1 and to 2.0 ...
Now i', trying the same thing with the JavaScript..
Actually i want to update some other cells + Some calculations also there whenever the dynamically created text field changed, thats the main thing i want to do. Coz the each and every cell in that page is dynamically created. I Have tried alot to do that Event handling.
I dnt want to use Ajax features in this app.
i knows the limitations of 1.1 and to 2.0 ...
Now i', trying the same thing with the JavaScript..
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: IE7/saving pages problem
- Next Thread: application extension problem
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol feedback findcontrol flash flv form forms gridview homeedition hosting iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings relationaldatabases rotatepage save search security serializesmo.table sessionvariables silverlight smartcard sql ssl suse textbox tracking treeview typeof unauthorized validatedate validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml






