Hi guys,
I'm using RadImageEditor inside a FormView and i'm trying to retrieve a imagem from a Postgre Database. I'm also using OpenAccessDataSource.
I follow this http://demos.telerik.com/aspnet-ajax/imageeditor/examples/default/defaultcs.aspx and this http://www.telerik.com/community/forums/aspnet-ajax/image-editor/combine-imageeditor-control-with.aspx links and i'm still not able to solve the issue.
In my aspx page i have the following code:
In code behind i have the following:
I'm getting the following error message:
"Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object."
I'm sure the image is in the Database because i'm able to see it through RadBinaryImage control.
Any help will be appreciated. Thanks in advance.
I'm using RadImageEditor inside a FormView and i'm trying to retrieve a imagem from a Postgre Database. I'm also using OpenAccessDataSource.
I follow this http://demos.telerik.com/aspnet-ajax/imageeditor/examples/default/defaultcs.aspx and this http://www.telerik.com/community/forums/aspnet-ajax/image-editor/combine-imageeditor-control-with.aspx links and i'm still not able to solve the issue.
In my aspx page i have the following code:
<telerik:RadImageEditor ID="RadImageEditor1" runat="server" OnImageLoading="RadImageEditor1_ImageLoading" Width="720px" Height="430px"></telerik:RadImageEditor>In code behind i have the following:
protected void RadImageEditor1_ImageLoading(object sender, ImageEditorLoadingEventArgs args){ DATA db = new DATA(); var r = (from a in db.Tb_example where a.example_id == Convert.ToInt64(frmExample.DataKey.Value) select a).FirstOrDefault(); if (r.Image != null) { MemoryStream s = new MemoryStream(r.Image.ToArray()); Telerik.Web.UI.ImageEditor.EditableImage img = new Telerik.Web.UI.ImageEditor.EditableImage(s); args.Image = img; args.Cancel = true; }}I'm getting the following error message:
"Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object."
I'm sure the image is in the Database because i'm able to see it through RadBinaryImage control.
Any help will be appreciated. Thanks in advance.
