Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i Want to add image option in my running hr Application but not success please help me
i send both .asp & .vb file.......

[edit]Large, badly formatted and unreadable code dump removed - OriginalGriff[/edit]
Posted
Updated 8-Apr-12 23:20pm
v2
Comments
Rahul Rajat Singh 9-Apr-12 4:38am    
please post the problem and problem related code.
Ashutosh_jha 9-Apr-12 5:19am    
when i upload image than show this message:-
System.Web.HttpException was unhandled by user code
ErrorCode=-2147467259
Message="'~/Temp/C:\Documents and Settings\Administrator\My Documents\Downloads\AGENT DIPLOMATIC CARD.jpg' is not a valid virtual path."
Source="System.Web"
StackTrace:
at System.Web.Util.UrlPath.CheckValidVirtualPath(String path)
at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative)
at System.Web.Util.UrlPath.Combine(String basepath, String relative)
at System.Web.UI.Control.ResolveClientUrl(String relativeUrl)
at System.Web.UI.WebControls.Image.AddAttributesToRender(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at ASP.hr_registration_scom_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) in D:\SCOM\hrmanagement\hr\Registration_Scom.aspx:line 57
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at ASP.hr_hr_master.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in D:\SCOM\hrmanagement\hr\HR.master:line 93
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
P.Salini 9-Apr-12 4:40am    
Dont dump your code, no one is going to look at it.
write the problem you facing and related code so that any one can help
Lakamraju Raghuram 9-Apr-12 5:22am    
I think if allowed, he wants to add even his today's horoscope (:

The answer is in the error message:
when i upload image than show this message:-
System.Web.HttpException was unhandled by user code
  ErrorCode=-2147467259
  Message="'~/Temp/C:\Documents and Settings\Administrator\My Documents\Downloads\AGENT DIPLOMATIC CARD.jpg' is not a valid virtual path."
  Source="System.Web"

at ASP.hr_registration_scom_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) in D:\SCOM\hrmanagement\hr\Registration_Scom.aspx:line 57

You are assembling the file name wrongly:
~/Temp/C:\Documents and Settings\
Is not a valid path.
Look at the lines immediately before line 57 of Registration_Scom.aspx and it should be obvious.
 
Share this answer
 
Looks like the problem is in path. you are either specifying the full path to save the image which should not be done. it should either be relative to the application or should be the path of virtual directory.

or lookng at this it seems

~/Temp/C:\Documents and Settings\Administrator\My Documents\Downloads\AGENT DIPLOMATIC CARD.jpg'

you are trying to save file in temp folder but using the complete filename as the filename to save. dont do that. find the file name from the string and then use that only.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900