I'm working on an asp site that has some code that apparently generates html, but I don't understand how it does it. I have used response.write to generate html before, but this looks different. See below example:
Response.Write (" <TR>"
Response.Write ( Label("Zip Code", COLUMN1WIDTH))
Response.Write (" <TD>"
Response.Write ( Textbox("UserZip", Session("UserZip", 10, Session("DisplayMode", 10))
Response.Write (" </TD>"
Response.Write (" </TR>"
Response.Write (" <TR>"
Response.Write ( Label("Admin?", COLUMN1WIDTH))
Response.Write (" <TD>"
Response.Write ( Textbox("Admin", Session("Admin", 10, Session("DisplayMode", 10))
' Response.Write "<INPUT type=checkbox disabled=true name=Admin value=" & Session("Admin" & ">" THIS IS A FAILED FIX ATTEMPT
Response.Write (" </TD>"
Response.Write (" </TR>"
In particular, I don't understand this line:
Response.Write ( Textbox("Admin", Session("Admin", 10, Session("DisplayMode", 10))
1. the "admin" field is a yes/no field in my access database. I need it to be a check box on my form. I tried changing "Textbox" to "Checkbox" but it doesn't recognize it. How do you get a checkbox to work in asp?
2. I have never seen a textbox generated by html without <input> tags. How is this happening and what do the 10's mean? I'm guessing the might be field lengths, but I don't understand the syntax and can't seem to find anything similar in my wrox book. I'm having no luck being able to change the text box to a check box.
Can anyone help me?
How much more water would there be in the ocean if it weren't for sponges?
Response.Write (" <TR>"
Response.Write ( Label("Zip Code", COLUMN1WIDTH))
Response.Write (" <TD>"
Response.Write ( Textbox("UserZip", Session("UserZip", 10, Session("DisplayMode", 10))
Response.Write (" </TD>"
Response.Write (" </TR>"
Response.Write (" <TR>"
Response.Write ( Label("Admin?", COLUMN1WIDTH))
Response.Write (" <TD>"
Response.Write ( Textbox("Admin", Session("Admin", 10, Session("DisplayMode", 10))
' Response.Write "<INPUT type=checkbox disabled=true name=Admin value=" & Session("Admin" & ">" THIS IS A FAILED FIX ATTEMPT
Response.Write (" </TD>"
Response.Write (" </TR>"
In particular, I don't understand this line:
Response.Write ( Textbox("Admin", Session("Admin", 10, Session("DisplayMode", 10))
1. the "admin" field is a yes/no field in my access database. I need it to be a check box on my form. I tried changing "Textbox" to "Checkbox" but it doesn't recognize it. How do you get a checkbox to work in asp?
2. I have never seen a textbox generated by html without <input> tags. How is this happening and what do the 10's mean? I'm guessing the might be field lengths, but I don't understand the syntax and can't seem to find anything similar in my wrox book. I'm having no luck being able to change the text box to a check box.
Can anyone help me?
How much more water would there be in the ocean if it weren't for sponges?