Produce Input FORM according to dbMyInputFlds.
Version: Gold
Namespace:
TornadoVersion: Gold
Assembly: Tornado (in Tornado.dll) Version: 12.6.0.9 (1.0.0.0)
Syntax
| C# |
|---|
public string ASPdbMyInputForm( string parms ) |
| Visual Basic (Declaration) |
|---|
Public Function ASPdbMyInputForm ( _ parms As String _ ) As String |
Parameters
- parms
- Type: System..::.String
tabletags=? | Errtags=? Default=style='text-align:center; Border-collapse:collapse'
Input form has a table containing the Input Form and a table containing the Submit Status. The tabletags and errtags are the tags inside the <TABLE ...>.
Return Value
Complete HTML code of Input Form.
Remarks
This examples are simple but accomplish a lot. See dbMyInputFlds for more examples.
Examples
<script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) Dim pop As String = "<A HREF='#' onClick=""window.open('/tornado/templates/Filter-instructions.htm'," _ & "'window_name', 'width=330, height=300, left=200, top=200, directories=no,menubar=no," _ & "toolbar=no,status=no')"">Hello Click Me</A>" Dim Mi As New Tornado.z With Mi .dbDebug = "Request" .dbQP = "U=1|S=aspdb|th=tit=My Input Form #4" Dim Inp As String = "(;~)Fi=One|Ty=RONOSEND|Def=Do Not Send Me~ " Inp &= "Fi=Two| Ty=ROSEND|Def=Send Me~ " Inp &= "Fi=Three| Ty=RONOSEND|Def=" & pop & "~ " Inp &= "Fi=Four| Ty=textcalendar~ " Inp &= "Fi=Five| Ty=CheckBox~ " Inp &= "Fi=Six| Ty=SelectBox| Val={{One,Three,Five,Seven}}| Tex={{1-7-2}}~ " Inp &= "Fi=Seven| Ty=RADIO| Val={{2003-2006}}~ " Inp &= "Fi=Eight| Ty=HIDDEN| Def=I am a hidden field~" Inp &= "Fi=Nine| Ty=TextArea| Tag=cols=25 rows=5 " .dbMyInputFlds = Inp Response.Write(.ASPdbMyInputForm()) End With End Sub </script>
<script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) Dim Mi As New Tornado.z Dim db As String = Server.MapPath("/tornado/GD/RFIDWorld.mdb") Mi.dbQP = "U=1|S=Airgate|th=tit=2007 RFID World Complementary Pass Request Form" Mi.dbValidatorParams = "code=/tornado/Jars|entry=false" Dim inp As String = "(;~)" inp &= "Fi=Title| Ty=SelectBox| Val={{Mr.,Mrs.,Ms.,Dr.}}~" inp &= "Fi=Name| type= TEXT| Tag=SIZE=50~" inp &= "Fi=Company| type=TEXT| Tag=SIZE=50~" inp &= "Fi=Position| type=TEXT| Tag=SIZE=50~" inp &= "Fi=Phone| type=TEXT| Tag=SIZE=50|mask=USPHONE|event=both|req=true|err=Invalid Phone e.g. XXX-XXX-XXXX~" inp &= "Fi=email| type=TEXT| Tag=SIZE=50|mask=EMAIL|event=both|req=true|err=Invalid email address~" inp &= "Fi=Application| type=TEXTAREA| Tag=COLS=50 ROWS=15 WRAP=True| Def=Default Text." Mi.dbMyInputFlds = inp Response.Write("<Center>" & Mi.ASPdbMyInputForm() & "</Center>") If Mi.ASPdbPostBack Then Dim log As String = CStr(Now()) Dim _title As String = Request.Form("Title").ToString Dim _name As String = Request.Form("name").ToString Dim _company As String = Request.Form("Company").ToString Dim _position As String = Request.Form("Position").ToString Dim _phone As String = Request.Form("Phone").ToString Dim _email As String = Request.Form("Email").ToString Dim _application As String = Request.Form("Application").ToString.Replace("'","''") Mi.dbQP = "u=1|Q=TB1|BM=TB1;0|Nh=t|D=" & db Dim val As String = "('" & _title & "','" & _name & "','" & _company & "','" & _position & "','" & _phone & "','" & _email & "','" & _application & "'," & "#" & log & "#)" Mi.dbSilentCmdText = "com=INSERT INTO TB1 (tit,nam,company,pos,phone,email,application,tlog) VALUES " & val If Mi.ASPdbExecuteCmd() > 0 Then Response.Write("<h1>Thank you for your interest in Airgate Technologies<BR>We'll get back to you</h1>") Else Response.Write("<h1>Error in adding record to database</h1>") End If End If End Sub </script>