如何在页面 控制 用户控件里面某个控件的属性??比如 一个用户控件 是 搜索框 这个搜索框里面有个 下拉框(里面是整个网站的6个子栏目,便于分类搜索). 如何在 6个子栏目的页面aspx 的pageload 时 修改 搜索框用户控件里面 下拉框 的 被选择项.....
解决方案 »
- Asp.net 模拟登录QQ,有JAVA现成代码,麻烦看看怎么转成asp.net 的
- 这样的数据库工厂
- 有关Server.Transfer("test.aspx")的问题
- 酷!中文网页错误信息,怎么做到的啊
- 这样的类应该怎么写?(类似生成静态页面的)
- 关于角色权限管理的设想请帮忙参谋一下。
- 100分在线等待,请大家帮忙,怎样在程序中移动Treeview选择到任意一个node?
- "常规网络错误, 请检查您的网络文档", 这是什么错误?
- 象http://www.aspxcn.com/论坛的首页是怎么做的?
- 在程序调试出现如下错是何原因???很奇怪的!!!
- asp.net 2 里的母板页怎么弄js
- 求教!在单独的一个数据库操作类中,怎样可以引用到Server.MapPath()
foreach (RepeaterItem item in this.Discipline1.DisciplineGroup.Items)
{
CheckBoxList tempCheckBoxList = (CheckBoxList)item.FindControl("chbdesciption");
foreach (ListItem checkitem in tempCheckBoxList.Items)
{
if (checkitem.Selected)
tempArray.Add(checkitem.Value);
}
}
if (tempArray.Count == 0)
{
this.valFailed.IsValid = false;
this.valFailed.ErrorMessage = "Please select scientific interests";
return;
}
tempSolver.Interesting = tempArray; try
{
if (FileUpload1.HasFile)
{
FileType = FileUpload1.PostedFile.ContentType;
FileSize = (int)FileUpload1.PostedFile.ContentLength;
UploadImages(FileUpload1, "SolverPhoto\\", 50, 50, out FilePath, out FileName, out fileid); tempSolver.FileInfo.Id = fileid;
tempSolver.FileInfo.ContentType = FileType;
tempSolver.FileInfo.DateCreated = DateTime.Now;
tempSolver.FileInfo.Name = FileName;
tempSolver.FileInfo.Path = FilePath;
tempSolver.FileInfo.Size = (long)FileSize;
}
else
{
//tempSolver.FileInfo = new Inno.Framework.FileInfo();
tempSolver.FileInfo = null;
}
tempSolver.Insert(); //email send
StringBuilder sb = new StringBuilder();
sb.AppendFormat("Dear {0}", this.txtusername.Text);
sb.Append("<br><br>");
sb.Append("Thank you for registering for InnoCentive.<br><br>");
sb.Append("For security purposes, we are emailing you your new password.<br><br>");
sb.AppendFormat("Your password is: {0}<br><br>", tempPassword);
sb.Append("Please login and change this password by visiting the \"My Profile\" section of the website.<br><br>");
sb.Append("Best,<br>InnoCentive<br><br>");
sb.Append("Please DO NOT reply to this email. This is a post only email.<br><br>");
sb.Append("[InnoCentive is a registered trade of InnoCentive, Inc. Other product or service names mentioned herein are the trades of their respective owners.]");
sb.Append("<br><br>");
sb.Append("InnoCentive, Inc. 35 New England Business Center, Andover, Massachusetts 01810-1071 USA"); WebUtil.SendEmail(this.txtEmail.Text, "[email protected]", "Thank you for your registering", sb.ToString());
this.vlSuccess.IsValid = false;
Page.ClientScript.RegisterStartupScript(typeof(Page), "ClientScript", "<script>window.open(\"RegisterSuccessfully.aspx\",\"\",\"width=500,height=200,left=250,top=250\");window.location.href='../SignIn/SignIn.aspx';</script>"); }
catch (Exception ex)
{
this.valFailed.IsValid = false;
this.valFailed.ErrorMessage = ex.Message +"If you forget your password, please <a href=\"EmailConfirmation.aspx\">click</a> here and we will resend the password to you.";
}
}其中Discipline1是usercontrol..
DisciplineGroup是discipline1中的repeater control名称
在discipline1中声明一个属性如下
public Repeater DisciplineGroup
{
get { return this.repDiscipline;}
}