Page.ClientScript.RegsterStartupScript(Me.GetType(), "alert", "OpenActiveX();", True)function OpenActiveX() { try { var xml = document.getElementById('MainContent_XmlTextReference').value; ... PageMethods.SaveXmlFile(xml) } catch (Err) { alert(Err.description); }}<Services.WebMethod()> _ Public Shared Function SaveXmlFile(ByVal xml As String) As Boolean ' work with returned from java script data Here need to display an alter when work with data is finished Return True End Function
I have
Public Class MyPage Inherits System.Web.UI.Page Private Shared MyPageHandle As MyPage Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then Try MyPageHandle = Me ... End If End Sub <Services.WebMethod()> _ Public Shared Function SaveXmlFile(ByVal xml As String) As Boolean ... MyPageHandle.RadWindowManager1.RadAlert("test", 100, 100, "test", 0) Return True End FunctionEnd Classadd a RadWindowManager to web page named and after that try to call it from shared method
without success
Thank you

I'm populating a treeview in c# asp.net and have bound data to it, all well and displays as it should. my problem now is that i'm looking to save any modifications to the checkboxes i.e if a user clicks an additional box and saves but i the checked state will stay false.
here's what i have so far which iterates through what was initially loaded and not what has been changed, I've tried many variations but haven't managed to get it working - anyone any ideas??
public void saveCheckedItems()
{
if (treeListItems.CheckedNodes.Count > 0)
{
IList<RadTreeNode> allNodes = treeListItems.GetAllNodes();
for (int i = 0; i < allNodes.Count; i++)
{
RadTreeNode node = (RadTreeNode)allNodes[i];
string fileid = node.Value.ToString();
if (node.Checked == true)
{
if (fileid.Length == 12)
{
saveTreeChanges(Page.Request.QueryString["ID"], fileid,connectionStr);
}
}
}
}
}
edit -
creating treeview as follows
<telerik:RadTreeView ID="treeListItems" runat="server" CheckBoxes="True" Height="320px"
TriStateCheckBoxes="true" CheckChildNodes="true" Skin="WebBlue" CssClass="table table-bordered" OnNodeDataBound="RadTreeView1_NodeDataBound" >
</telerik:RadTreeView>
binding data like this
public void loadTreeList()
{
DataTable dt = treeMan.getTreeList(connectionStr);
treeListItems.DataTextField = "Description";
treeListItems.DataValueField = "FieldID";
treeListItems.DataFieldID = "FieldID";
treeListItems.DataFieldParentID = "ParentID";
treeListItems.DataSource = dt;
treeListItems.DataBind();
treeListItems.ExpandAllNodes();
}
in the example im testing its a 3 tier tree and one element is checked on third tier. When i click more items only this already checked item is visible in the list
I am getting the Invalid length issue frequently in my application. Using of SessionPageStatePersister from earlier implementation hiddenfieldpagestatepersister did not resolve the issue.
Can any body please help me out?
[FormatException: Invalid length for a Base-64 char array.]
at System.Convert.FromBase64String(String s)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String\ serializedState)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String\ serializedState)
at System.Web.UI.SessionPageStatePersister.Load()
[HttpException: The state information is invalid for this page and might be corrupted.]
at System.Web.UI.SessionPageStatePersister.Load()
at Telerik.Web.UI.RadSessionPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.pages_appeal_appealaction_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Message: Sys.ArgumentException: does not derive from Sys.Component.
URI: /ScriptResource.axd?d=................................................
Don't know what is happening but the same control works in a different server where we could upload images.
But in 2 other servers we get an error as mentioned above while uploading an image.
Thanks
