且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以在页面中多次使用相同的用户控件?

更新时间:2021-07-31 08:00:22

参考此CP帖子



在页面中多次使用相同的用户控件无法正常工作 [ ^ ]
Refer this CP post

Same User control use for multiple times in a page is not working properly [^]


您好b $ b

抱歉,我犯了一个错误。实际上在下面的代码中。



Hi
Sorry I made a mistake. Actually in the below code.

if (InsurerID.Text != "0")
{
	LQMasterAssetDataContext CDbIN = new LQMasterAssetDataContext();
	TB_MasterAssetInsurer AssInsurer = CDbIN.TB_MasterAssetInsurers.FirstOrDefault(C => C.mAIN_NUPKId == mobjGenlib.ConvertLong(InsurerID.Text));
	InsurerName.Text = AssInsurer.mAIN_VCAgentname;
}
 
if (SoldID.Text != "0")
{
	LQMasterAssetDataContext CDbIN = new LQMasterAssetDataContext();
	TB_MasterAsset AssSoldto = CDbIN.TB_MasterAssets.FirstOrDefault(C => C.mASS_NUPKId == mobjGenlib.ConvertLong(SoldID.Text));
	SoldName.Text = AssSoldto.mASS_mACC_NUPKId_Soldto.ToString();
}





而不是连接到帐户表



Instead of connecting to the Account table

(TB_MasterAccount)

我错误地给自己的表名称为

i wrongly given its own table name as

(TB_MasterAsset

TB_MasterInsurer





一旦我更改了上述内容,它就能正常工作。



Once i changed the above things it was working fine.