前台:

<asp:Literal ID = "ChiCunShow" runat = "server"></asp:Literal>

后台:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataEntity;
using System.Data;
using BRules; public partial class Manager_CYzhushou_new : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
MsgShow.Text= TradeBin();//行业主键ID=876。餐饮服务,电商服务,电子商品附ID为876
ChiCunShow.Text = ChiCun();//尺寸主键ID=880。具体尺寸(例:100*100)附ID为876
}
} public string TradeVal = System.Configuration.ConfigurationManager.AppSettings["TradeVal"].ToString();
public string ChiCunVal = System.Configuration.ConfigurationManager.AppSettings["ChiCunVal"].ToString();
/// <summary>
/// 绑定行业
/// </summary>
/// <param name="parentid"></param>
/// <returns></returns>
public string TradeBin(int parentid)
{ string Returnstr = "";
Tinfodict sTinfodict = TinfodictRules.getonebypk(parentid);
DataTable table = TinfodictRules.getonebyparentid(int.Parse(TradeVal));
foreach (DataRow row in table.Rows)
{ Returnstr += "<li> <a href='#'>" + row["dictname"].ToString() + "</a></li>";//拼接li绑定到Literal }
return Returnstr;
}
/// <summary>
/// 绑定尺寸
/// </summary>
/// <param name="ChiCunID"></param>
/// <returns></returns>
public string ChiCun(int ChiCunID)
{
string returnstr = "";
Tinfodict sTinfodict = TinfodictRules.getonebypk(ChiCunID);
DataTable tab = TinfodictRules.getonebyparentid(int.Parse(ChiCunVal));
foreach(DataRow crow in tab.Rows)
{
returnstr += "<li> <a href='#'>" + crow["dictname"].ToString() + "</a></li>";//拼接li绑定到Literal
}
return returnstr;
}
}

web.config配置

<configuration>
<appSettings>
<!--<add key="excel" value="E:\项目\派瑞威行\新建文件夹\gdt_helper\webhelper\Excel\"/>-->
<add key="excel" value="G:/Perry/webhelper/Excel"/>
<add key="mailName" value="zhangshuochao@jcteam.cn"/>
<add key="mailShowName" value="zhangshuochao@jcteam.cn"/>
<add key="mailPwd" value="zhang564335"/>
<!--媒体ID-->
<add key="MediaVal" value=""/>
<!--行业ID-->
<add key="TradeVal" value="" />
<!--尺寸-->
<add key="ChiCunVal" value="" />
<!--客户ID-->
<add key="CustVal" value=""/>
</appSettings>
<connectionStrings>

最新文章

  1. 【leetcode】Unique Binary Search Trees (#96)
  2. hdu 1258 Sum It Up(dfs+去重)
  3. 一些简单的PGSQL 操作
  4. GridControl
  5. android:launchMode概述
  6. C++实现一个限制对象实例个数的类
  7. For Aisha(阿伊莎)
  8. [0] MVC&amp;MVP&amp;MVVM差异点
  9. C# - 设计模式 - 钩子模式
  10. [SQL]LeetCode183. 从不订购的客户 | Customers Who Never Order
  11. Linux软件包的安装(rpm+yum)
  12. 如何确定一个NFS的mount是v3还是v4?
  13. 关于报错“syntax error near unexpected token `”和回车换行
  14. Julia - 字符串
  15. java 基础 --集合--012
  16. COGS1752. [BOI2007]摩基亚Mokia CDQ
  17. mysql分组查询报错
  18. slice()、substring()、substr()的区别用法
  19. Jetty数据同步使用
  20. 浏览器输入一个url到整个页面显示出来经历了哪些过程?

热门文章

  1. 8、vue路由跳转 params与query 路由传参
  2. Selenium 3----窗口截图+关闭浏览器
  3. io 口方向调整 stm32
  4. LeetCode 70 - 爬楼梯 - [递推+滚动优化]
  5. 香茅油:不只是驱虫剂 new
  6. LeetCode 705 Design HashSet 解题报告
  7. ASM: Active Shape Models--Their Training and Application
  8. volatile有什么用?能否用一句话描述volatile的应用场景
  9. python一次性解压多层嵌套zip压缩包
  10. spring注解:反射与配置