لدى مشكلة فى FindControls in MasterPage Insid UpdatePanel
هذا الكلاس للبحث عن الشيلد كنترولز
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public class Class2 : System.Web.UI.Page
{
public class class2
{
//-------------------------------------------------------------------------
//FindControls In MasterPage (Content) ContentPlaceHolder
public Control FindChildControl(Control start, string id)
{
if (start != null)
{
Control foundControl;
foundControl = start.FindControl(id);
if (foundControl != null)
{
return foundControl;
}
foreach (Control c in start.Controls)
{
foundControl = FindChildControl(c, id);
{
}
if (foundControl != null)
{
return foundControl;
}
}
}
return null;
}}وهذا كود البيج لود Page_Load
Imports System.Web
Imports System.Web.UI
Partial Class Trans
Inherits System.Web.UI.Page
Dim x As Class2.class2
Dim up As UI.UpdatePanel
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim UpdatePanel1 As System.Web.UI.UpdatePanel = CType(x.FindChildControl(Master, "ContentPlaceHolder1").FindControl("UpdatePanel1"), System.Web.UI.UpdatePanel)
End Sub
Protected Sub Clear_Click(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
End Classارجو Functions لتفريغ صناديق النصوص من البياتات يتم استدعاءة فى الصفحة بعد قراءة الكنترولز فى البيج لود
شاكرا تعاونكم معي
المثال مرفق مع كلاس C Sharp