Write your own code generator (1) with asp.net.

Source: Internet
Author: User
Tags generator table name visual studio
ASP.net Recent realism class collection Class control class what is too "class", so it took a little time to write a code generator, share with you!

Frmmain. ASPX

<%@ Page language= "C #" codebehind= "FrmMain.aspx.cs" autoeventwireup= "false" inherits= "Web_test.frmmain"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<title>FrmMain</title>
<meta name= "generator" content= "Microsoft Visual Studio 7.0" >
<meta name= "Code_language" content= "C #" >
<meta name= "vs_defaultClientScript" content= "JavaScript" >
<meta name= "vs_targetschema" content= "http://schemas.microsoft.com/intellisense/ie5" >
</HEAD>
<body ms_positioning= "GridLayout" >
<form id= "Frmmain" method= "POST" runat= "Server" >
<asp:textbox id= "Txtservername" style= "Z-INDEX:101; left:116px; Position:absolute; top:24px; Design_time_lock:true "runat=" Server "font-size=" 10pt "design_time_lock=" True ">192.168.0.220</asp:textbox >
<asp:label id= "Label7" style= "z-index:112; left:24px; Position:absolute; top:98px; Design_time_lock:true "runat=" Server "width=" 79px "height=" 20px "font-size=" 10pt "design_time_lock=" True "> List of databases </asp:Label>
<asp:label id= "Label6" style= "z-index:111; left:27px; Position:absolute; top:169px; Design_time_lock:true "runat=" Server "width=" 53px "height=" 20px "font-size=" 10pt "design_time_lock=" True "visible=" False ' > Field name </asp:Label>
<asp:label id= "Label5" style= "z-index:109; left:27px; Position:absolute; top:135px; Design_time_lock:true "runat=" Server "width=" 53px "height=" 20px "font-size=" 10pt "design_time_lock=" True "> table name < /asp:label>
<asp:button id= "Button1" style= "z-index:107; left:496px; Position:absolute; top:91px; Design_time_lock:true "runat=" Server "width=" 102px "text=" gettable "font-size=" 10pt "design_time_lock=" True "> </asp:Button>
<asp:label id= "Label4" style= "z-index:106; left:288px; Position:absolute; top:63px; Design_time_lock:true "runat=" Server "width=" 79px "height=" 20px "font-size=" 10pt "design_time_lock=" True "> Password < /asp:label>
<asp:label id= "Label2" style= "z-index:105; left:25px; Position:absolute; top:61px; Design_time_lock:true "runat=" Server "width=" 79px "height=" 20px "font-size=" 10pt "design_time_lock=" True "> Username </asp:Label>
<asp:label id= "Label1" style= "z-index:104; left:25px; Position:absolute; top:28px; Design_time_lock:true "runat=" Server "width=" 79px "height=" 20px "font-size=" 10pt "design_time_lock=" True "> Server name </asp:Label>
<asp:textbox id= "Txtpassword" style= "z-index:103; left:376px; Position:absolute; top:60px; Design_time_lock:true "runat=" Server "font-size=" 10pt "backcolor=" Transparent "forecolor=" BLACK "bordercolor=" white "Design_time_lock= True" ></asp:TextBox>
<asp:textbox id= "txtUserName" style= "z-index:102; left:116px; Position:absolute; top:62px; Design_time_lock:true "runat=" Server "font-size=" 10pt "design_time_lock=" True ">sa</asp:TextBox>
<asp:dropdownlist id= "DropDownList1" style= "z-index:108; left:115px; Position:absolute; top:135px; Design_time_lock:true "runat=" Server "width=" 208px "autopostback=" true "font-size=" 10pt "design_time_lock=" true " ></asp:DropDownList>
<asp:dropdownlist id= "DropDownList2" style= "z-index:110; left:115px; Position:absolute; top:171px; Design_time_lock:true "runat=" Server "width=" 208px "height=" 28px "font-size=" 10pt "design_time_lock=" True "visible=" False "></asp:DropDownList>
<asp:button id= "Button2" style= "z-index:113; left:355px; Position:absolute; top:92px; Design_time_lock:true "runat=" Server "width=" 107px "text=" Getdatabase "design_time_lock=" True "></asp:button >
<asp:dropdownlist id= "DropDownList3" style= "z-index:114; left:115px; Position:absolute; top:98px; Design_time_lock:true "runat=" Server "width=" 207px "height=" 25px "design_time_lock=" True "></asp:dropdownlist >
<asp:button id= "Button3" style= "z-index:115; left:354px; Position:absolute; top:132px; Design_time_lock:true "runat=" Server "width=" 110px "text=" generated "design_time_lock=" True "visible=" False "></asp: Button>
<asp:textbox id= "Txtlayout" style= "z-index:117; left:26px; Position:absolute; top:206px; Design_time_lock:true "runat=" Server "width=" 619px "height=" 367px "textmode=" MultiLine "backcolor=" Ivory "Design_ time_lock= "True" ></asp:TextBox>
<asp:button id= "Button4" style= "z-index:118; left:497px; Position:absolute; top:130px; Design_time_lock:true "runat=" Server "height=" 25px "width=" 105px "text=" entity class "design_time_lock=" True "></asp: Button>
<asp:button id= "Button5" style= "z-index:119; left:355px; Position:absolute; top:171px; Design_time_lock:true "runat=" Server "width=" 107px "text=" Test "height=" 25px "design_time_lock=" True "visible=" False "></asp:Button>
<asp:button id= "Button6" style= "z-index:120; left:499px; Position:absolute; top:171px; Design_time_lock:true "runat=" Server "height=" 23px "width=" 105px "text=" collection Class "design_time_lock=" True "visible=" False " ></asp:Button>
</form>
</body>
</HTML>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.