在线等,问题解决,立马给分,急急急!!前台js事件里怎么调用后台方法?我的代码总是报错,
<asp:Repeater ID="ReaIndex" runat="server"
onitemdatabound="ReaIndex_ItemDataBound"
onitemcommand="ReaIndex_ItemCommand">
<HeaderTemplate><table> <tr></HeaderTemplate>
<ItemTemplate>
<td>
<a href="../BackStage/AddArea/AddArea.aspx"><li>
<asp:Image ID="imgIndex" ImageUrl='
<%#GetPic(Eval("AreaLogoPath")) %>' runat="server" width="160" height="120"/>
<p class="hei14cu"><%#Eval("AreaName")%></span></p>
<p
><%#Eval("[AreaCity]")%> 场地面积
:<%#Eval("AreaAcreage")%>平方米</p>
<p>适宜活动
:<%#GetAreaUse(Eval("AreaUseID")) %></p>
<p class="lan12">点击查看全景图<span>更多..</span></p>
</li></a></td>
</ItemTemplate>
<FooterTemplate></tr></table></FooterTemplate>
</asp:Repeater>
上面是绑定repeater的方法,
下面是前台js代码: function CheckIsroom(id){
document.getElementById(id).innerHTML="";
document.getElementById(id).style.display='';
var hideshinei=$('#hideshinei').val();
hideshinei='1';
var s='<%=
CancelIsroomShinei()&>';
alert(a);
后台方法: public void
CancelIsroomShinei() {
GetShinei = "";
GetHuwai = "";
GetPerson = "";
GetMoney = "";
ShowSql(AreaCitys, GetShinei, GetHuwai, GetPerson, GetMoney);
BindArea();//绑定repeater方法
}
总是报参数不正确,急死我了,就要交项目了,各位大侠,小弟菜鸟,帮帮忙吧,
------解决方案--------------------
function CheckIsroom(id){
document.getElementById(id).innerHTML="";
document.getElementById(id).style.display='';
var hideshinei=$('#hideshinei').val();
hideshinei='1';
window.location.href = "Index.aspx?type="+type;
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
if(!string.IsNullOrEmpty(Request.QueryString["type"])&&Request.QueryString["type"]=="Add")
{