473,386 Members | 1,842 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,386 software developers and data experts.

Formview control

Hi, I'm just starting to poke around with asp.net, and have stumbled on
this problem:

I'm converting an old MS Access database to a web solution. I have
created individual user controls for each table, and added these to my
webpage. Now the master table "cars" has a usercontrol consisting
primarily of a formview and a accessdatasource. A car can be of a type
(bus, sportscar, etc.), data on the type is stored in the "carType"
usercontrol, which has also been added to the page.
Using me.session variables I the "carType" usercontrol is updated
whenever a new car is selected. However, and this is my problem: when I
on the "cars" usercontrol -formview select "NEW" then I can't figure
out how to get then "carType" usercontrol to update, it still shows the
info for the previously selected car! On the "car" usercontrol ->
formview -InsertTemplate I have added a dropdownlist listing
everthing in the "carType" table. But I can't trigger an update of the
"carType" usercontrol based on the value selected in this dropdownlist!

It seems, that whenever i can actually access the value of the
dropdownlist, then the "carType" usercontrol has already been
rendered...

Some guidance will be appreciated..

/Anders

Sep 5 '06 #1
8 1069
<da*****@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
I'm converting an old MS Access database to a web solution. I have
created individual user controls for each table,
Any particular reason for having an individual user control for each
table...?
Sep 5 '06 #2

Mark Rae wrote:
<da*****@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
I'm converting an old MS Access database to a web solution. I have
created individual user controls for each table,

Any particular reason for having an individual user control for each
table...?
lol... My initial reason was to keep it simple :D

Sep 5 '06 #3
"dalholm" <da*****@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Mark Rae wrote:
><da*****@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegr oups.com...
I'm converting an old MS Access database to a web solution. I have
created individual user controls for each table,

Any particular reason for having an individual user control for each
table...?

lol... My initial reason was to keep it simple :D
But, by contrast, it sounds like all you've done is over-complicate it...

WebForms isn't like WinForms at all...
Sep 5 '06 #4
Maybe, this is also a learning process...

I think I have solved it if only I can fire a postback event on
fromview modechanged, any ideas

/Anders

Sep 5 '06 #5
"dalholm" <da*****@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
I think I have solved it if only I can fire a postback event on
fromview modechanged, any ideas
fromview modechanged ???
Sep 5 '06 #6
"dalholm" <da*****@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
Maybe, this is also a learning process...
Sure, and don't take this the wrong way, but have you considered getting one
of the ASP.NET beginner's guide books and working your way through it...?
This is really good:
http://www.amazon.com/ASP-NET-Everyd...e=UTF8&s=books

Nobody is born knowing this stuff, but it makes things so much easier if you
have a good basic grounding. If you get yourself into bad habits and
practices from the beginning, it can be really difficult to unlearn them...

As a jobbing contractor, I'm often called in to fix stuff, and I've seen
some horror stories in my time, though I must confess I've never seen an
ASP.NET app which has an individual UserControl for every table... :-)
Sep 5 '06 #7

Mark Rae wrote:
"dalholm" <da*****@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
I think I have solved it if only I can fire a postback event on
fromview modechanged, any ideas

fromview modechanged ???
modechanged doesn't work since it gets fired before the controls have
acutally been instantiated/loaded, if only...

I actually like the idea of the many usercontrols, since some of them
could potentially be used on other pages. And they are all pretty
selfcontained, only depending on the availability of a session
variable..

/anders

Sep 5 '06 #8
It would actually seem that my only problem is making the session
variable available ahead of time...

Sep 5 '06 #9

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

Similar topics

2
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...
2
by: P. Yanzick | last post by:
Hello, I am creating an edit template for a FormView control, changing one of the textboxes to a dropdown box. The dropdown will be populated from a simple table with the primary key, and a...
7
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...
2
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
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,...
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...

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.