Geting MapPath in Customer Server Control
-
Hello, Would you please do me a favour by asnwering this question please... In my customer Server Control (Composite Control), I have a File Upload component which has an Event handler of Click. within the Click Event Handler, I wanted to save the uploaded file to a given path. I wanted to use MapPath() method but I dont get any reference working for this method. I know it works when we have ASPX page and this mehtod is a member of Page Class. But I could not get any workaround to get the useful path information from the virutal path in the Customer Server Control. Can you please help me. Regards Bashiwala.
-
Hello, Would you please do me a favour by asnwering this question please... In my customer Server Control (Composite Control), I have a File Upload component which has an Event handler of Click. within the Click Event Handler, I wanted to save the uploaded file to a given path. I wanted to use MapPath() method but I dont get any reference working for this method. I know it works when we have ASPX page and this mehtod is a member of Page Class. But I could not get any workaround to get the useful path information from the virutal path in the Customer Server Control. Can you please help me. Regards Bashiwala.
In you custom control you can not get direcr ref to SERVER object, User HttpContext.Current.Server.MapPath()
Nobody is perfect i'm Nobody
-
In you custom control you can not get direcr ref to SERVER object, User HttpContext.Current.Server.MapPath()
Nobody is perfect i'm Nobody
Dear saifigr8 Thanks a lot, thats what the snippet I was searching for. you helped me a lot in this way. Regards Bashiwala