protected void Page_Load(object sender, EventArgs e){ List<MyObject> myList = new List<MyObject>(); myList.Add(new MyObject { yValue = 3, xValue = -20 }); myList.Add(new MyObject { yValue = -1, xValue = -10 }); myList.Add(new MyObject { yValue = -5, xValue = 3 }); myList.Add(new MyObject { yValue = 1, xValue = 5 }); myList.Add(new MyObject { yValue = 8, xValue = 6.5 }); myList.Add(new MyObject { yValue = 4, xValue = 7 }); myList.Add(new MyObject { yValue = 3, xValue = 10 }); myList.Add(new MyObject { yValue = 7, xValue = 15 }); RadChart1.PlotArea.XAxis.IsZeroBased = false; RadChart1.DataSource = myList; RadChart1.PlotArea.XAxis.DataLabelsColumn = "xValue"; RadChart1.DataBind();}public class MyObject{ public double yValue { get; set; } public double xValue { get; set; }}Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
<!DOCTYPE html PUB'.
Can any one please help me on this?
<script> $(document).ready(function() { //select all the a tag with name equal to modal $("#imgBtnBack").click(function(e) { if (($("#radTextBoxNotes_text").val().length === 0) && ($('#rblChangeButtonType input:checked').val() == '100000000') && ($("#RadDatePicker1").val().length === 0)) { history.back(); return false; } else { //Cancel the link behavior e.preventDefault(); //Get the A tag var id = "#dialog"; //Get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); //Set height and width to mask to fill up the whole screen $('#mask').css({ 'width': maskWidth, 'height': maskHeight }); //transition effect $('#mask').fadeIn(0); $('#mask').fadeTo("fast", 0.8); //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $(id).css('top', winH / 2 - $(id).height() / 2); $(id).css('left', winW / 2 - $(id).width() / 2); //transition effect $(id).fadeIn(0); } }); //if close button is clicked $('.window .close').click(function(e) { //Cancel the link behavior e.preventDefault(); $('#mask, .window').hide(); }); //if mask is clicked $('#mask').click(function() { $(this).hide(); $('.window').hide(); }); }); function OnClientClicked(sender, eventArgs) { //if close button is clicked $('.window .close').click(function(e) { //Cancel the link behavior e.preventDefault(); $('#mask, .window').hide(); }); }</script><
asp:Panel runat="server" ID="InnerContainer" >
<telerik:RadGrid ID="Radshowtraining" AllowMultiRowSelection="false" AllowSorting="false" runat="server" GridLines="None"
AllowFilteringByColumn="true" AllowPaging="true" AutoGenerateColumns ="false" PageSize="10" >
<ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="True" >
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView Width="100%" AllowMultiColumnSorting="false" AutoGenerateColumns="false"
DataKeyNames="Id" ClientDataKeyNames="Id">
<Columns>
<telerik:GridTemplateColumn UniqueName="TemplateDeleteColumn" HeaderText="Attended"
AllowFiltering="false" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"
ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
<ItemTemplate>
<telerik:RadGrid ID="Radshowattendedtraining" AllowMultiRowSelection="false" AllowSorting="false" runat="server" GridLines="None"
AllowFilteringByColumn="true" AllowPaging="true" AutoGenerateColumns ="false" PageSize="10">
<MasterTableView Width="100%" AllowMultiColumnSorting="false" AutoGenerateColumns="false">
<Columns>
<telerik:GridBoundColumn DataField="Id" HeaderText="Id" Visible ="false" />
<telerik:GridBoundColumn DataField="Training" HeaderText="Training" />
<telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" />
<telerik:GridBoundColumn DataField="EndDate" HeaderText="End Date" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="TemplateDeleteColumn" HeaderText="Provided"
AllowFiltering="false" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"
ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
<ItemTemplate>
<telerik:RadGrid ID="RadshowProvidedtraining" AllowMultiRowSelection="false" AllowSorting="false" runat="server" GridLines="None"
AllowFilteringByColumn="true" AllowPaging="true" AutoGenerateColumns ="false" PageSize="10">
<MasterTableView Width="100%" AllowMultiColumnSorting="false" AutoGenerateColumns="false">
<Columns>
<telerik:GridBoundColumn DataField="Id" HeaderText="Id" Visible ="false" />
<telerik:GridBoundColumn DataField="Training" HeaderText="Training" />
<telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" />
<telerik:GridBoundColumn DataField="EndDate" HeaderText="End Date" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<GroupingSettings CaseSensitive="false" />
</telerik:RadGrid>
</asp:Panel>
<table>
<tr><td><asp:button runat="server" id="Button1" text="save dashboard" />
<br/><br/></td></tr>
<telerik:raddocklayout runat="server" enableviewstate="false" id="RadDockLayout1" onloaddocklayout="RadDockLayout1_LoadDockLayout" Skin="Web20"
onsavedocklayout="RadDockLayout1_SaveDockLayout" storelayoutinviewstate="false" >
<tr>
<td valign="top">
<telerik:raddockzone runat="server" id="RadDockZone1" width="402px" min-height="200px">
</telerik:raddockzone>
</td>
<td valign="top">
<telerik:raddockzone runat="server" id="RadDockZone2" width="402px" min-height="200px">
</telerik:raddockzone>
</td></tr>
<tr><td colspan="2"><telerik:raddockzone runat="server" id="RadDockZone3" Width="820px" MinHeight="200px" >
</telerik:raddockzone></td></tr>
</table>
</telerik:raddocklayout>
private void Page_Load(object sender, System.EventArgs e)
{
}
private List<DockState> CurrentDockStates
{
get
{
//Get saved state string from the database - set it to dockState variable for example
string dockStatesFromDB = "";
string loginID = "xxx";
string loginPassword = "xxx";
using (XcendaDC1DataContext context = new XcendaDC1DataContext())
{
var users = from u in context.tbUsers
where (u.U_userLogin.Contains(loginID) && u.U_userPassword.Contains(loginPassword))
select u;
var x = users.FirstOrDefault();
if (x != null)
{
dockStatesFromDB = x.U_dockState;
}
}
List<DockState> _currentDockStates = new List<DockState>();
string[] stringStates = dockStatesFromDB.Split('|');
foreach (string stringState in stringStates)
{
if (stringState.Trim() != string.Empty)
{
_currentDockStates.Add(
DockState.Deserialize(stringState));
}
}
return _currentDockStates;
}
}
protected void Page_Init(object sender, EventArgs e)
{
int docksCount = CurrentDockStates.Count;
// raddock1
RadDock raddock1 = new RadDock();
raddock1.ID =
string.Format("RadDock{0}", docksCount);
raddock1.Title =
"Products";
// raddock1.Text = string.Format("Added at {0}", DateTime.Now);
raddock1.UniqueName =
Guid.NewGuid().ToString();
raddock1.Width =
Unit.Pixel(300);
raddock1.Skin =
"Web20";
RadGrid gv = new RadGrid();
ArrayList arrListProducts = new ArrayList();
arrListProducts.Add(
"product 1");
arrListProducts.Add(
"product 2");
arrListProducts.Add(
"product 3");
arrListProducts.Add(
"product 4");
arrListProducts.Add(
"product 5");
arrListProducts.Add(
"product 6");
arrListProducts.Add(
"product 7");
gv.DataSource = arrListProducts;
gv.DataBind();
raddock1.ContentContainer.Controls.Add(gv);
raddock1.Commands.Add(
new DockCloseCommand());
raddock1.Commands.Add(
new DockExpandCollapseCommand());
RadDockZone1.Controls.Add(raddock1);
}
protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e)
{
//Populate the event args with the state information. The RadDockLayout control
// will automatically move the docks according that information.
foreach (DockState state in CurrentDockStates)
{
e.Positions[state.UniqueName] = state.DockZoneID;
e.Indices[state.UniqueName] = state.Index;
}
}
protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)
{
List<DockState> stateList = RadDockLayout1.GetRegisteredDocksState();
StringBuilder serializedList = new StringBuilder();
int i = 0;
while (i < stateList.Count)
{
serializedList.Append(stateList[i].ToString());
serializedList.Append(
"|");
i++;
}
string dockState = serializedList.ToString();
if (dockState.Trim() != String.Empty)
{
string loginID = "myID";
string loginPassword = "myPassword";
using (XcendaDC1DataContext context = new XcendaDC1DataContext())
{
var users = from u in context.tbUsers
where (u.U_userLogin.Contains(loginID) && u.U_userPassword.Contains(loginPassword))
select u;
var x = users.FirstOrDefault();
if (x != null)
{
x.U_dockState = dockState;
context.SubmitChanges();
}
}
}
}