473,395 Members | 1,670 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

dynamically adding a FormView

I am trying to make a page that has a drop down list at the top, and
based upon the selection in the drop down list, inserts a FormView in
the bottom of the page. I tried to create each of my FormView's in
seperate files, and then use the following method.

<!--#include file=<name of correct file>-->

It worked fine to include my control. The problem occured when I
wanted to have a code behind for each FormView. I cannot have a page
declarative where I specify the code-behind b/c I get a compiler error
stating that I cannot have more than one page declarative (I already
have one for the page this FormView is being added to).

Is there a better way to dynamically add and remove FormView's that
have code-behind files to a standard ASP.NET page? Do I need to try a
completely different approach? Any help would be greatly appreciated.

Apr 30 '07 #1
1 2147
On Apr 30, 1:49 pm, justin <justin.cre...@gmail.comwrote:
I am trying to make a page that has a drop down list at the top, and
based upon the selection in the drop down list, inserts a FormView in
the bottom of the page. I tried to create each of my FormView's in
seperate files, and then use the following method.

<!--#include file=<name of correct file>-->

It worked fine to include my control. The problem occured when I
wanted to have a code behind for each FormView. I cannot have a page
declarative where I specify the code-behind b/c I get a compiler error
stating that I cannot have more than one page declarative (I already
have one for the page this FormView is being added to).

Is there a better way to dynamically add and remove FormView's that
have code-behind files to a standard ASP.NET page? Do I need to try a
completely different approach? Any help would be greatly appreciated.
Sorry, I'm still learning. I changed my FormView's from aspx files to
ascx files. Everything is happy now.

Apr 30 '07 #2

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

Similar topics

3
by: sck10 | last post by:
Hello, I am creating a form for users to enter information about a lab and the members of the lab. I have one form (FormView) that they use to enter information about that lab. The keyvalue is...
0
by: Rabbit | last post by:
Hi, All, I have a FormView, in which the InsertItemTemplate has a dropdownlist that I need to set the datasource as my self created dataset. I have been trying various syntax like following at...
0
by: Paul | last post by:
I'm trying to create a FormView dynamically. I've created Itemplate classes for Edit and Item templates and I can get either to work when I set the default mode. But I can't get it to switch...
0
by: Fred Dag | last post by:
Hi, I have a FormView that uses a ObjectDataSource. It retreives data alright but when updating it gives a ObjectDataSource 'ObjectDataSourceCatalogueItem' could not find a non-generic method...
4
by: J055 | last post by:
Hi I have 2 update buttons in my FormView ('Apply' and 'OK'). I want both buttons to update the data source but the 'OK' button should redirect afterwards. I can see which button is clicked...
2
by: sck10 | last post by:
Hello, I have 3 objects: LinkButton GridView FormView The LinkButton is used to open the FormView in Insert mode. The GridView provides a list of products. When the "Select" link is
9
by: Chris | last post by:
I am dynamically adding a user control to each row in a gridview. The reason I am doing it dynamically is the user control is different depending on certain data in the gridview. The gridview...
1
by: gsauns | last post by:
I have a FormView control bound to a data source. Right now, I am working with the regular old ItemTemplate. I have one field that I would like to set a label's Text property equal to (easy enough...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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...

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.