Atitit.ui Control---Drop-down menu select the implementation of the control select HTML

Source: Internet
Author: User

Atitit.ui control --- drop -down menu Select the implementation of the control select HTML

1. Call & model implementation 1

2.-----select.jsp------1

1. Call& Modelthe implementation

Proj.vod2

<%

List li=new ArrayList ();

Map m=new HashMap ();

M.put ("Lab", " Love ");

M.put ("V", "1");

Li.add (m);

DropDownList dropdownlist1=new DropDownList ();

Dropdownlist1.datasource = Li;

Dropdownlist1.datavaluefield = "V";

Dropdownlist1.datatextfield = "Lab";

Dropdownlist1.databind ();

Session.setattribute ("Ddl1", DropDownList1);

%>

<jsp:include page= ". /com.attilax/ui/select.jsp? Dropdownlistid=ddl1&id=applicationtype "flush=" true "/>

Author:: Old Wow's paw attilax Ayron, email:[email protected]

Reprint please indicate source: Http://blog.csdn.net/attilax

2.-----select.jsp------

<%@ page contenttype= "text/html; Charset=utf-8 "language=" java "import=" java.sql.* "%>

<% @page import= "Java.io.File"%>

<% @page import= "Java.util.ArrayList"%>

<% @page import= "Java.util.HashMap"%>

<% @page import= "Java.util.List"%>

<% @page import= "Java.util.Map"%>

<% @page import= "System.Web.UI.WebControls.DropDownList"%>

<% @page import= "Com.attilax.core"%>

<select name= "<%=request.getparameter (" id ")%>" id= "<%=request.getparameter (" id ")%>" >

<%

DropDownList ddl= (DropDownList) Session.getattribute (Request.getparameter ("Dropdownlistid"));

List Li=ddl. DataSource;

%>

<%= core.tojsonstro88 (DDL)%>

<%

for (Object Object:li) {

Map m= (map) object;

%>

<option value= "<%=m.get (DDL. DataValueField)%> "><%=m.get (DDL. DataTextField)%></option>

<%}%>

</select>

ASP . NET drop-down list data binding issues. _ Baidu knows . htm

Atitit.ui Control---Drop-down menu select the implementation of the control select HTML

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.