asp.netc#生成用户控件参数ASP.net对我来说是新手,交过一个已有的项目。我写了SO:Asp.NetWebForms-HowtopassViewDataasparamtousercontrol,但由于没有回应,我无法说清楚。我想做这个:Consignment.ascx:<%@ControlLanguage="C#"Inherits="System.Web.Mvc.ViewUserControl"%><%varapplicationId=ViewData["NoiId"];varapplicationSpecies=ViewData["applicationSpecies"]asHashSet;//与JSvarapplicationSpecies相同,但来自服务器-需要构建页面%>...但它在如何让工作?感谢@TetsuyaYamamoto的评论,这就是我想出的。我觉得SpeciesGridView.ascx在使用CodeBehind对象时会更好,而不是包括上面的C#学习教程:asp.netc#generateusercontrolparameters分享全部内容,如果对大家有用还需要了解更多关于C#学习教程,希望大家多多关注——Consignment.ascx;%>..._grid"style="display:none;">SpeciesGridViewDTO.cs使用System;使用System.Collections.Generic;使用System.Linq;使用System.Text;使用System.Runtime.Serialization;命名空间Daff.Lae...]publicStringSpeciesCode{get;set;}publicSpeciesGridViewDTO(intNoiId,stringSpeciesCode){this.NoiId=NoiId;this.SpeciesCode=SpeciesCode;}}}SpeciesGridView.ascx"%>().Name("grdNlsConsignment"+Model.SpeciesCode)...本文收集自网络,不代表立场。如涉及侵权,请点击右侧联系管理员删除。如需转载请注明出处: