Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 26, 2012 11:12 PM by shafaqat309
May 22, 2012 05:19 AM|LINK
Hello I have the following codebehind for the new AjaxFileUpload
protected void AjaxFileUpload_Click(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
int ProID = Convert.ToInt32(ddlProduct.SelectedValue);
string filename = (HttpContext.Current.Request.PhysicalApplicationPath) + "PropImages\\" + ProID.ToString() + "\\" + e.FileName;
It uploads the file fine but ProID is always 0, no matter which product I choose from the ddlProduct dropdownlist. I've tried using other controls including TextBox controls and they are all empty, I can't seem to reference the correct asp control values
from the AjaxFileUpload codebehind.
Any suggestions are welcome.
Thanks in advance,
May 22, 2012 04:28 PM|LINK
place a break point and check whats the value in Request["ddlProducts"]
if it exists then use that itself
May 22, 2012 05:38 PM|LINK
Thanks for the reply,
I've placed this line on the code
string dllp = Request["ddlProperties"];
and the value of ddlp is null
It seams that I can't access any of the controls, I've also tried to update my listview1 and it does not update it
What else can I try?
May 23, 2012 03:27 AM|LINK
Jun 02, 2012 08:14 PM|LINK
Hi chetan the link you provided does not cover codebehind.
Jun 04, 2012 09:07 AM|LINK
Dec 26, 2012 11:12 PM|LINK
Could it be that since we are dealing with Ajax the control's code behind can't access other controls on the page?
Were u able to solve the problem?