Torna al Thread
---aggiungo nel load della pagina
Dim cbReference As String
cbReference = Page.ClientScript.GetCallbackEventReference(Me, _
"arg", "ritorno", "context")
Dim callbackScript As String = ""
callbackScript &= "function CallServer(arg, context) { " & _
cbReference & "} ;"
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), _
"CallServer", callbackScript, True)
--- nellevento rowdatabound
e.Row.Attributes.Add("onmouseover", "javascript:return mod_css_crea('" & e.Row.RowIndex & "'); return true;")
e.Row.Attributes.Add("onmouseout", "javascript:return mod_css_crea('" & e.Row.RowIndex & "'); return true;")
Dim LitDvX As Literal = CType(e.Row.Cells(0).FindControl("LitDv"), Literal)
LitDvX.Text = "<div id='tit_crea_" & e.Row.RowIndex & "' style='width:100%; display:none;'>" & _
"<input type='checkbox' id='chkVist' value='false' runat='server' onserverchange='chkVist_ServerChange' " & _
"onclick='chkVist_onclick(" & e.Row.RowIndex & ")' />" & _
"</div>"
nello script della pagina
---la function che gestisce il div
function mod_css_crea(e) {
var dvx = document.getElementById("tit_crea_" + e);
if (dvx.style.display == "none") {
dvx.style.display = "block";
}
else {
dvx.style.display = "none";
}
}
---la function che mi fa il callback
function chkVist_onclick(e) {
CallServer(e, "");
}
---la function di ritorno (in questo caso non ho bisogno di nient'altro
function ritorno() {
alert("Aggiornamento realizzato cn successo!!!");
location.reload('ini.aspx');
}