Hi,
In UI,
I have
1. RadBinary image control to show Image from database
2. Button control to save Image
I have two events
1. Page_load()
2. btnSave_Click()
In Page_Load()
1. I'm getting Byte value from database and assigning it to RadBinaryImage.DataValue
In btnSave_Click
1. I'm getting DataValue from RadBinaryImage control (assigned during page_load event)
2. Save it into database
3. But DataValue is null while retrieving from RadBinaryImage.
Code:
Page_Load
{
if(!PostBack)
{
//Passing resoruceId and get resource object which contains Image value
eFMResource resource = oAdminBase.GetResource(eResource.ResourceId);
radBinaryImage.DataValue= resource.ImageValue;
}
}
btnSave_Click
{
eFMResource resource = new eFMResource ();
//Getting DataValue from radBinaryImage and assign it to the object to save into db.
resource.ImageValue = radBinaryImage.DataValue;
oAdminBase.SaveResource(resource);
}
Thanks,
Sabarish.
In UI,
I have
1. RadBinary image control to show Image from database
2. Button control to save Image
I have two events
1. Page_load()
2. btnSave_Click()
In Page_Load()
1. I'm getting Byte value from database and assigning it to RadBinaryImage.DataValue
In btnSave_Click
1. I'm getting DataValue from RadBinaryImage control (assigned during page_load event)
2. Save it into database
3. But DataValue is null while retrieving from RadBinaryImage.
Code:
Page_Load
{
if(!PostBack)
{
//Passing resoruceId and get resource object which contains Image value
eFMResource resource = oAdminBase.GetResource(eResource.ResourceId);
radBinaryImage.DataValue= resource.ImageValue;
}
}
btnSave_Click
{
eFMResource resource = new eFMResource ();
//Getting DataValue from radBinaryImage and assign it to the object to save into db.
resource.ImageValue = radBinaryImage.DataValue;
oAdminBase.SaveResource(resource);
}
Thanks,
Sabarish.