or
public void DeleteGrid(object sender, EventArgs e, PlaceHolder ph)
{
LinkButton gridLink = (LinkButton)sender;
String gridNum = gridLink.ID.ToString().Split('-').Last();
System.Web.UI.Page currentPage;
currentPage = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;
RadGrid grid = (RadGrid)currentPage.FindControl("RadGrid" + gridNum);
Label lbl = (Label)currentPage.FindControl("Break-" + gridNum);
LinkButton lbd = (LinkButton)currentPage.FindControl("Delete-Grid-" + gridNum);
LinkButton lb = (LinkButton)currentPage.FindControl("Show-Grid-" + gridNum);
grid.Visible = false;
lbl.Visible = false;
lbd.Visible = false;
lb.Visible = false;
HttpContext.Current.Session.Add(gridNum, null);
}
public void PreviewAll(PlaceHolder ph)
{
ph.Controls.Clear();
for (int i = 1; i <= Convert.ToInt32(GetSession()); i++)
{
if (HttpContext.Current.Session[i.ToString()] == null)
{
HttpContext.Current.Response.Write("Session " + i.ToString() + " is null");
}
else
{
LinkButton btn = new LinkButton();
btn.ID = "Modal-" + i.ToString();
btn.Text = "Show Room " + i.ToString();
btn.Click += (sender, e) => ShowPopUp(sender, e, i, ph);
DataTable table = (DataTable)HttpContext.Current.Session[i]; // Get the data table.
Label lbl = new Label();
lbl.ID = "Room-" + i.ToString();
lbl.Text = "Room " + i.ToString();
Label lblBreak = new Label();
lblBreak.ID = "Label-Break" + i.ToString();
lblBreak.Text = "<
br
/>";
ph.Controls.Add(lbl);
ph.Controls.Add(lblBreak);
ph.Controls.Add(btn);
ph.Controls.Add(lblBreak);
foreach (DataRow row in table.Rows) // Loop over the rows.
{
foreach (var item in row.ItemArray) // Loop over the items.
{
Label lblValue = new Label();
lblValue.ID = "Label-Value-" + item.ToString();
lblValue.Text = item.ToString();
Label lblBreak2 = new Label();
lblBreak2.ID = "Label-Break" + i.ToString();
lblBreak2.Text = "<
br
/>";
ph.Controls.Add(lblValue);
ph.Controls.Add(lblBreak2);
}
}
}
}
}
POST http://website.co.uk/Telerik.Web.UI.WebResource.axd?type=rau
500 Internal Server Error{"TotalChunks":1229,"ChunkIndex":0,"TotalFileSize":2577377324,"UploadID":"1381758285922File
.zip"}
Server Error in '/' Application.
Value was either too large or too small for an Int32.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.OverflowException: Value was either too large or too small for an Int32.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[OverflowException: Value was either too large or too small for an Int32.]
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +9594371
System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo) +53
System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +302
[Exception: 2577377324 is not a valid value for Int32.]
System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +489
System.ComponentModel.TypeConverter.ConvertFromInvariantString(String text) +43
System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +510
System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +147
System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object propertyValue, Object o, String memberName, JavaScriptSerializer serializer, Boolean throwOnError) +220
System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +1175
System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +71
System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +147
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +66
System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(String input) +74
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
Telerik.Web.UI.AsyncUpload.SerializationService.Deserialize(String obj, Type type) +237
Telerik.Web.UI.AsyncUploadHandler.HandleChunkUploadRequest(String serializedMetaData) +31
Telerik.Web.UI.AsyncUploadHandler.ProcessRequest(HttpContext context) +262
Telerik.Web.UI.HandlerRouter.ProcessHandler(String handlerKey, HttpContext context) +92
Telerik.Web.UI.HandlerRouter.ProcessHandler(HttpContext context) +54
Telerik.Web.UI.WebResource.ProcessRequest(HttpContext context) +39
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
<telerik:RadNumericTextBox ID="radNumForexComp" runat="server" Culture="English (South Africa)" |
DbValue='<%# Databinder.Eval(Container.DataItem, "Forex Comp") %>' InvalidStyleDuration="100" |
LabelCssClass="radLabelCss_Web20" Skin="Telerik" Width="80px" style="TEXT-ALIGN: right" Font-Size="8pt"> |
<NumberFormat AllowRounding="False" DecimalDigits="4"/> |
<FocusedStyle BorderColor="Red" BorderStyle="Double" /> |
<HoveredStyle BorderColor="Red" BorderStyle="Double" /> |
</telerik:RadNumericTextBox> |