Why not use a third party Code Generation tool? I'm sure
Conessto have
templates that would do what you want, for one.
HTH
Mark
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Boster Sibande
Sent: Wednesday, 5 July 2006 1:41 a.m.
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: [DOTNET-WEB] Looking for Code generator.
Good people,
I am developing a database driven web application. I do not
want to write
too much code from scratch. Therefore, I want to use the
Visual Studio
controls and wizards. However, the problem I have is that
the wizards
produce ASP.Net code while I want VB or C# code. Is there a
tool that can
help me convert the ASP.Net code generated to VB or C#.
Example:
ASP.Net Code
<asp:GridView ID="GridView1"
runat="server"
AutoGenerateColumns="False"
DataSourceID="AccessDataSource1">...</asp:
GridView>
<asp:AccessDataSource ID="AccessDataSource1"
runat="server"
DataFile="~/App_Data/testdb.mdb"
SelectCommand="SELECT * FROM
[Table1]"></asp:AccessDataSource>
Should be converted to VB or C# Code as follows:
string strOleDbconnection =
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=~/App_Data/testdb.mdb;)";
OleDbConnection OleDbConnection = new
OleDbConnection(strOleDbconnection);
OleDbCommand OleDbCommand = new OleDbCommand("select *
from table1",
OleDbConnection); OleDbConnection.Open(); OleDbDataReader
reader =
OleDbCommand.ExecuteReader(); GridView1.DataSource = reader;
GridView1.DataBind();
Thanks,
Boster.
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|