想实现51job简历添加-教育经历添加效果 想实现51job简历添加-教育经历添加(多条教育经历添加)效果 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 刚登录看了下,或许一共20个隐藏的div,当点击"继续添加"时就显示一个div但上面有点不现实,应该是动态的生成的html控件 是罩层效果吗,可以参考:jquery框架里面的nyroModalprototype框架里面的lightwindow 是罩层效果吗,可能参考:jquery框架里面的nyroModal;prototype框架里面的lightwindow 仿51job多选源码:http://download.csdn.net/source/1377508 点击按钮时,生成动态div的id,用id判断个数,获取值循环添加arraylist,形成对象添加到数据库中... 可以用 用户控件设计好要添加的教育经历格式,再在页面调用用户控件,放一个button,点击就添加一个用户控件,需要在cs里写代码,保存当前页面状态,不然的话页面刷新会丢掉所有数据 可以绑定,你在页面写方法,存值,不保存的话,你点击button刷新页面的时候,值就丢了 int Count { get { if(ViewState["ControlCount"] == null) { ViewState["ControlCount"] = 0; } return (int)ViewState["ControlCount"]; } set { ViewState["ControlCount"] = value; } } protected void Page_Load(object sender, EventArgs e) { for(int i=1;i<=Count;i++) { LoadUserControl(i); } } protected void LoadUserControl(int index) { Control ctl = this.LoadControl("suiyi.ascx");//用户控件的名字 ctl.ID = string.Format("userControl_{0}",index); this.Panel1.Controls.Add(ctl);//这个panel1是在用户控件里面设计格式的时候用到的,你想要添加的教育经历的格式放到一个容器里面,也可以是别的 } //点击按钮,添加一个用户控件 protected void ButtonAdd_Click(object sender, EventArgs e) { Count++; LoadUserControl(Count); }你看看这样行不行 包括dropdownlist控件比如专业 那就往dropdownlist里面绑东西,可以用数据源,也可以写代码 没有报错,如果注释掉if (!Page.IsPostBack)就可以执行绑定如果去掉的话,就会重新绑定,值会丢失 protected void Page_Load(object sender, EventArgs e) { //if (!Page.IsPostBack) //{ bind_ddl_industry(); //} } /// <summary> /// 行业 /// </summary> public void bind_ddl_industry() { DataBase.DBHelper dbhelper = new DataBase.DBHelper(connstr); string comstr = "select Industry_ID ,Industry_CnText from [81hr_Industry]"; ddl_industry.DataSource = dbhelper.ExecuteDataTable(comstr); ddl_industry.DataValueField = "Industry_ID"; ddl_industry.DataTextField = "Industry_CnText"; ddl_industry.DataBind(); ddl_industry.Items.Insert(0, new ListItem("--请选择--", "-1")); } 第一次加载为什么Page.IsPostBack=true 新手请教:emp.ExecuteNonQuery();提示‘;’附近有语法错误。 Oracle中视图分页查询 程序在ASP.net里执行速度快,还是在数据库查询器里执行速度快? 使用cdo发邮件的奇怪问题,谢谢 请问如何将一个Label控件与一个TextBox控件绑定在一起? .net 能否访问128G以上的内存? 网上考试系统的自动生成试题的问题,谁能解决一下.50分 未将对象引用设置到对象的实例。 帮帮忙,高手进来帮我修改一下代码 哪里错了啊?? 预编译的asp.net项目通过什么方法反编译出源码 急救 !.net 3.5中类中 session 的命名空间是什么?
但上面有点不现实,应该是动态的生成的html控件
jquery框架里面的nyroModal
prototype框架里面的lightwindow
jquery框架里面的nyroModal;
prototype框架里面的lightwindow
http://download.csdn.net/source/1377508
点击按钮时,生成动态div的id,用id判断个数,获取值循环添加arraylist,形成对象添加到数据库中...
可以绑定,你在页面写方法,存值,不保存的话,你点击button刷新页面的时候,值就丢了
{
get
{
if(ViewState["ControlCount"] == null)
{
ViewState["ControlCount"] = 0;
}
return (int)ViewState["ControlCount"];
}
set
{
ViewState["ControlCount"] = value;
}
} protected void Page_Load(object sender, EventArgs e)
{
for(int i=1;i<=Count;i++)
{
LoadUserControl(i);
}
} protected void LoadUserControl(int index)
{
Control ctl = this.LoadControl("suiyi.ascx");//用户控件的名字
ctl.ID = string.Format("userControl_{0}",index);
this.Panel1.Controls.Add(ctl);//这个panel1是在用户控件里面设计格式的时候用到的,你想要添加的教育经历的格式放到一个容器里面,也可以是别的
}
//点击按钮,添加一个用户控件
protected void ButtonAdd_Click(object sender, EventArgs e)
{
Count++;
LoadUserControl(Count);
}你看看这样行不行
比如专业
如果去掉的话,就会重新绑定,值会丢失
{
//if (!Page.IsPostBack)
//{
bind_ddl_industry();
//} } /// <summary>
/// 行业
/// </summary>
public void bind_ddl_industry()
{
DataBase.DBHelper dbhelper = new DataBase.DBHelper(connstr);
string comstr = "select Industry_ID ,Industry_CnText from [81hr_Industry]";
ddl_industry.DataSource = dbhelper.ExecuteDataTable(comstr);
ddl_industry.DataValueField = "Industry_ID";
ddl_industry.DataTextField = "Industry_CnText";
ddl_industry.DataBind();
ddl_industry.Items.Insert(0, new ListItem("--请选择--", "-1"));
}