PDA

View Full Version : برخورد با ارور ...Error 33 'Telerik.Web.Examples.TreeView.Templates.pagename. TextBoxTemplate'



adineh67
پنج شنبه 06 بهمن 1390, 11:07 صبح
سلام به دوستان برنامه نویس
من از telerik tree view تو پروژم استفاده کردم کدیو که در ادامه آوردم داره تو یه پروژه دیگه کار میکنه ولی وقتی میارمش تو برنامه ی خودم با این ارور برخورد می کنم:
Error 33 'Telerik.Web.Examples.TreeView.Templates.pagename. TextBoxTemplate' does not implement interface member 'System.Web.UI.ITemplate.InstantiateIn(System.Web. UI.Control)'

web.config هم تنظیم کردم کدیم که استفاده می کنم اینه:



namespace Telerik.Web.Examples.TreeView.Templates
{
public partial class pagename : System.Web.UI.Page
{
protected override void OnInit(EventArgs e)
{
RadTreeView1.NodeTemplate = new TextBoxTemplate();
}
class TextBoxTemplate : ITemplate
{
public void InstantiateIn(Control container)
{

}
public void InstantiateIn2(Control container)
{
Literal lr1 = new Literal();
lr1.Text =
"<div class=" + "\"" + "node-album-data" + "\"" + ">" +
"<img src=" + "\"" + "Img/sticky.png" + "\"" + "width=" + "\"" + "73" + "\"" + "height=" + "\"" + "74" + "\"" + "/>" +
"<span class=" + "\"" + "details" + "\"" + ">" + "This was the first album recorded on the Rolling Stones" + "</span>"
+ "</div>";
container.Controls.Add(lr1);
}
public void InstantiateIn1(Control container1)
{
Literal lr = new Literal();
lr.Text =
"<div class=" + "\"" + "node-album" + "\"" + ">" +
"<span class=" + "\"" + "band" + "\"" + ">" +
"</span><span class=" + "\"" + "album" + "\"" + ">مشخصات" + "</span>" +
"</div>";
container1.Controls.Add(lr);
}
}


ممنون می شم راهنماییم کنین:لبخندساده: