本文介绍了如何将gridview行的particalr值作为参数传递给javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 - 场景 gridview1 addressid1 addressid2 map 12 100 linkbutton1 13 200 linkbutton2 14 300 linkbutton3 - 现在当我点击链接按钮(假设linkbutton2即第二行) 13 和 100 应该传递 as javascipt函数的参数。 函数OpenGoogleRouteWindow(addressid1,addressid2) { var sFeatures = ' dialogHeight:700px; dialogWidth:1000px;'; var windowValue = window.showModalDialog(' GoogleMapRoute.aspx?ID =' + addressid1 + ' & Type =' + addressid2, ' ',sFeatures); } - 我不想使用gridview的rowdatabound。可以在没有rowdatabound的情况下完成吗? - 告诉我如何将particualr行的参数传递给javascipt函数。 如果单击第3行linkutton,那么14和300将作为参数传递给函数。我可以使用该功能打开一个新窗口。解决方案 --scenariogridview1addressid1 addressid2 map 12 100 linkbutton113 200 linkbutton214 300 linkbutton3--now when i click the link button (suppose linkbutton2 i.e second row)13 and 100 should be passed as parameter to the javascipt function. function OpenGoogleRouteWindow(addressid1, addressid2) { var sFeatures = 'dialogHeight: 700px;dialogWidth: 1000px;'; var windowValue = window.showModalDialog('GoogleMapRoute.aspx?ID=' + addressid1+ '&Type=' + addressid2, '', sFeatures); }--i dont want to use rowdatabound of gridview. Can it be done without rowdatabound ? --Tell me the way how to pass the parameter of particualr row to javascipt function. if 3rd row linkutton is clicked then 14 and 300 will be passed as parameter to the function. ANd i can use that function to open a new window. 解决方案 这篇关于如何将gridview行的particalr值作为参数传递给javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-17 22:50