ajax addparam,Ajaxfy Problem

1. I am using Rad Grid control. In this control i use the form with user controls.In user control i am using with Image uploader.

In that image uploader contains some java script. If i am using without ajaxfy it works fine. If i use within ajaxfy it's not working.

Please give me a solution for me. Here with i attached user control coding.

Sample Coding

@ControlLanguage="C#"AutoEventWireup="true"CodeBehind="OutSideVendor.ascx.cs"Inherits="JetSoftAdmin.UserControl.OutSideVendor"%>

@RegisterAssembly="Telerik.Web.UI"Namespace="Telerik.Web.UI"TagPrefix="telerik"%>

<

linkhref="../Skins/JetSoftStyle/AdminStyle.css"rel="Stylesheet"type="text/css"/>

@RegisterAssembly="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet"Namespace="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet"TagPrefix="jet"%>

@RegisterAssembly="Aurigma.ImageUploader"Namespace="Aurigma.ImageUploader"TagPrefix="imageup"%>

@RegisterTagName="ucl"TagPrefix="AreaAssosications"Src="~/UserControl/AreaAssociationUserControl.ascx"%>

@ImportNamespace="System.IO"%>

@ImportNamespace="System.Xml"%>

<

telerik:RadCodeBlockID="radCode"runat="server">

telerik:RadCodeBlock>

<

scripttype="text/javascript">

//

varbitBucket = 0;

vardesktop = 1;

varmyComputer = 2;

varmyDocuments = 3;

varmyMusic = 4;

varmyPictures = 5;

varmyVideo = 6;

varnetwork = 7;

functionchangeView(view) {

getImageUploader(

"ImageUploader1").setFolderView(view);

}

//Check if appropriate special folder (My Documents, Desktop, etc) exists.

//If some of these folder is missing, hide appropriate button.

functioncheckButton(name, folderId) {

if(getImageUploader("ImageUploader1").CanGoToFolder(folderId)) {

document.getElementById(name +

"Holder").style.display ="block";

}

}

//window.onload = function(){

functionFullPageLoad() {

checkButton(

"Desktop", desktop);

checkButton(

"MyDocuments", myDocuments);

checkButton(

"MyComputer", myComputer);

checkButton(

"MyPictures", myPictures);

checkButton(

"MyVideo", myVideo);

checkButton(

"Network", network);

}

functionItemsPersonalInfoTitleRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoSuffixRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoTitleRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoHomePhoneRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoTitleRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoCellPhoneRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoWorkPhoneRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoFaxRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoStateRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoTitleRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsPersonalInfoCountryRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsGeneralInfoVendorCategoryTypeRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsSecondContactHomePhoneRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsSecondContactCellPhoneRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsSecondContactWorkPhoneRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

functionItemsSecondContactFaxRequesting(sender, eventArgs) {

varcombo1 = $find("");

varitem = combo1.get_selectedItem();

document.getElementById(

"").value = item.get_value();

}

//]]>

<

divclass="contactcontent_inner">

">

">

MultiPageID="OutsideVendorMultipage">

"Selected="True">

">

">

">

">

SelectedIndex="0"Width="100%">

"Width="530px">

"Width="530px">

"ToolTip="">

Width="462px"TabIndex="3">

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
try{ //1.获取参数值YX220 String rolepks = YSPubUtils.getExpHintLoanByRole(pk_corp); //2.查询出参数值为空,则全部角色提示 if(YCPubUtils.isEmpty(rolepks)){ return true; } //3.当前登录用户为空,不提示 if (YCPubUtils.isEmpty(userpk)){ return false; } String[] roles = rolepks.split(YCConstants.STRING_SPLIT_SEMICOLON); //从YX220参数获取不需要提示【是否借款】的角色pk Set<String> rolepkSet = new HashSet<String>(Arrays.asList(roles)); //4.根据当前登录用户PK和公司,查询出该用户的角色PK String sql = "select pk_role from sm_user_role where cuserid = ? and pk_corp = ? and isnull(dr,0)=0"; SQLParameter param = new SQLParameter(); param.addParam(userpk); param.addParam(pk_corp); Set<String> currolepks = (Set<String>) SHYCProxy.getUAPQueryBS().executeQuery(sql, param ,new HashSetColumnProcessor()); //5.查询登录用户绑定的角色为空则不进行提醒 if(YCPubUtils.isEmpty(currolepks)){ return false; } //当前登录用户的所有角色,将存在于集合A中的但不存在于集合B中的元素移除 currolepks.retainAll(rolepkSet); return currolepks.size() > 0; }catch(Exception e){ Logger.error(e.getMessage(),e); throw new BusinessException("参数格式有误,请检查公司级参数YX220!"); } 优化点: 1. 将注释与代码分离,让代码更加清晰易读。 2. 使用currolepks.retainAll(rolepkSet)代替手动遍历移除元素,提高代码简洁性和性能。 3. 减少if语句嵌套,提高代码可读性。 4. 将异常捕获和处理放到try-catch块中,提高代码健壮性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值