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

Changing a dynamic C# Code to database drven...

Hi Everyone,

i have a "static" source code which works fine. my problem is now, that the
look of the internet page is only to be changed by editing the source code.
For better handling of the code i thought that i might generate the page
elements (textbox, label, dropdown aso) from a database.

is that possible and do you know any examples articles for drowpdowns,
textbox, labels from a database?
Thanks a lot!

Ciao
Seb.
Nov 16 '05 #1
2 2548
Seb, there are many ways to do this. Lets say that I have a table with the
name of the control, the type and say it's position. you can walk through a
datareader or datatable and at each pass add the controls dynamically
setting there properties as you go. Is this essentially what you are
looking for?

--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Sebastian Meier" <ag*********@abuse.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi Everyone,

i have a "static" source code which works fine. my problem is now, that the look of the internet page is only to be changed by editing the source code. For better handling of the code i thought that i might generate the page
elements (textbox, label, dropdown aso) from a database.

is that possible and do you know any examples articles for drowpdowns,
textbox, labels from a database?
Thanks a lot!

Ciao
Seb.

Nov 16 '05 #2
Hm,

not actually, cause the whole code of the page should be generate from a
database. That means eg. i have a Text (Label) then i have Dropdownlist or a
Textbox. Now i want to do the following (this not correct c# code ;-)

Page_Load
conn to database, read elements
1st Label and Value, 2nd Dropdown / Textbox

buttons aso. so all elements you have in an web page.
so that at the end i have a complete internet page generated from db.
currently i have a ascx controll in which the elemets are static and when i
add one i have to do that in the cs file to.

hope u get my problem?! so eventually the aspx/ascx page itself has no code.

sorry bad english today....

Cheers
Seb.

"William Ryan eMVP" <do********@comcast.nospam.net> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP09.phx.gbl...
Seb, there are many ways to do this. Lets say that I have a table with the name of the control, the type and say it's position. you can walk through a datareader or datatable and at each pass add the controls dynamically
setting there properties as you go. Is this essentially what you are
looking for?

--

W.G. Ryan, eMVP

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Sebastian Meier" <ag*********@abuse.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi Everyone,

i have a "static" source code which works fine. my problem is now, that

the
look of the internet page is only to be changed by editing the source

code.
For better handling of the code i thought that i might generate the page
elements (textbox, label, dropdown aso) from a database.

is that possible and do you know any examples articles for drowpdowns,
textbox, labels from a database?
Thanks a lot!

Ciao
Seb.


Nov 16 '05 #3

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

Similar topics

1
by: Guinness Mann | last post by:
When you guys talk about "dynamic SQL," to what exactly are you referring? Is dynamic SQL anything that isn't a stored procedure? Specifically, I use ASP.NET to communicate with my SQL Server...
4
by: jrefactors | last post by:
I want to distinguish between static SQL, dynamic SQL, and embedded SQL, but couldn't find too much useful resources in the web. For example, if we put SQL statements (SELECT, INSERT, UPDATE,...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
8
by: George Meng | last post by:
I got a tough question: The backgroud for this question is: I want to design an application works like a engine. After release, we can still customize a form by adding a button, and source code...
2
by: deejayquai | last post by:
Hi I'm trying to produce a report based on a dynamic crosstab. Ultimately i'd like the report to actually become a sub report within a student end of year record of achievement. The dynamic...
10
by: jflash | last post by:
Hello all, I feel dumb having to ask this question in the first place, but I just can not figure it out. I am wanting to set my site up using dynamic urls (I'm assuming that's what they're...
5
by: pittendrigh | last post by:
There must be millions of dynamically generated html pages out there now, built by on-the-fly php code (and jsp, perl cgi, asp, etc). Programatic page generation is transparently useful. But...
1
by: rag84dec | last post by:
Hi, I have an asp code which creates a grid or matrics (5 x 5 matrics).Each cell contains a button which will have an initial .The initial will be read from a database. say the database has...
3
by: Darkside12 | last post by:
Hi, I'm trying to build a dynamic query by form. The idea is that a user can select a table in the database via a combo box and this will then change all of the text box labels on the form to...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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...
0
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,...

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.