473,602 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FormView: how to bind events to controls inside a loaded template?

1 New Member
Hi,
I'm using a FormView with a dynamically loaded item template. Inside the template (an ascx file loaded through Page.LoadTempla te(...) ) there is a button and I need to invoke the click event on that button.
Any ideas?

Thanks in advance,
ElwoodBDR529
Jan 7 '10 #1
1 3064
Frinavale
9,735 Recognized Expert Moderator Expert
The button click event is triggered when the user clicks the button. That event is handled by the control that owns the button (ie your user control).

If you need to call the functionality that is in the button click event then move it into a public function that can be access by both the button click event and the parent code.

-Frinny
Jan 7 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4259
by: John R. Lewis | last post by:
I posted this yesterday with a different email address. I am reposting with my fake-address as given to me by Microsoft so that I can be guraranteed a response from a support representative. Sorry for the repost. I'd like to make use of the asp:Wizard control to present a step-by-step guided experience for my user to fill out a complicated data-entry form. I'd like to make use of two-way databinding provided by the asp:FormView control...
1
1656
by: photo | last post by:
Hi! I am new to .net (vb) and moving from classic asp. I ran into a problem that has left me with less hair on my head. For some reason, my button and calendar that sits inside an insertItemTemplate in a FormView, will not allow me to declare it. The controls (Calendar1, InvoiceDate) are in the page and names are correct. Here is the sub I am using.
7
4340
by: Lorenzino | last post by:
Hi, I have a problem with bindings in a formview. I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the sqldatasource of the formview. If i put this textboxes outside the table everything works well, but as soon as i put them inside the table (in order to organize the layout in the right way) they doesn't work. They works only as eval() and not bind()...
2
9887
by: Ned Balzer | last post by:
I'm trying to create a formview bound to a sqldatasource, and use a stored procedure to insert data from the formview into several tables. I have some simplified code below, the real code is much longer but this should illustrate the problem: <asp:FormView ID="bookFormView" runat="server" DataSourceID="bookSqlDataSource"> <ItemTemplate> <asp:textBox id="name" text='<%# Eval("name") %>'
2
8633
by: wikkiwikkiwaa | last post by:
hello, i am trying to access controls inside my formview1 nested inside loginview1. you cannot access the formview1 unless you are properly logged in. for loginview1, that seems to be fairly simple. a label control would be: Label label1 = (Label)loginview1.FindControl("nameoflabel"); then i get to the data that was bound to that control.
2
2764
by: Kelly | last post by:
I'm fairly new to ASP.NET2, but I have an ASP 3.0 background, and I've been experimenting with the DataSource and FormView widgets. I wound up having some questions along the way which I hope you all can address to help me understand events with these better. I've been reading up on inserted/inserting also deleted/deleting, but where is it better to run call those events from via formview or datasource? Also, I have been trying to...
3
4499
by: YMPN | last post by:
Hi Everyone, I'm deen from Riyadh. Please do help me with some problem i have. I have this formview control setup to recieved inputs from user (textbox, dropdownlist, others). After inserting, I want to send the data via email, the problem is how do I do that?
6
14443
by: AG | last post by:
ASP.NET 2.0 aspx page with a FormView bound to an ObjectDataSource to view, add and edit records. Can anyone point me to a sample of how to retain the user entered control values when an insert fails? In other words, when inserting a new record, user enters data in the controls, but the insert fails. When the page posts back all the controls are empty or at their default values. I would like to retain the user enter values so they can...
3
5400
by: J055 | last post by:
Hi I can't figure out what the difference is here. Sometimes I have a simple FormView control in a page and I can use the FormView.FindControl method to get a Label or TextBox with in it during the DataBound event. Then I can use a FormView somewhere else and the FindControl method can't find any of the inner controls. I get a NullReferenceException. I always check to see which Template is loaded first. I know that if you loop through...
0
7993
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
8401
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
8268
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
6730
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
5440
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();...
0
3900
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...
1
2418
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
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
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.