Click here to Skip to main content
16,009,114 members
Home / Discussions / C#
   

C#

 
QuestionGetChildAtPoint which is out of screen Pin
tsunsau71720-Nov-05 17:06
tsunsau71720-Nov-05 17:06 
QuestionC# inheritance Pin
ppp00120-Nov-05 16:53
ppp00120-Nov-05 16:53 
AnswerRe: C# inheritance Pin
Christian Graus20-Nov-05 17:10
protectorChristian Graus20-Nov-05 17:10 
AnswerRe: C# inheritance Pin
S. Senthil Kumar20-Nov-05 18:50
S. Senthil Kumar20-Nov-05 18:50 
QuestionAdding button to Menu Bar in Office 2003 Web Components Pin
ykoon20-Nov-05 16:25
ykoon20-Nov-05 16:25 
Questionquestion on Impersonation Pin
ekynox20-Nov-05 15:16
ekynox20-Nov-05 15:16 
AnswerRe: question on Impersonation Pin
ekynox20-Nov-05 18:09
ekynox20-Nov-05 18:09 
QuestionString.Replace with Escaped Characters Pin
Reanalyse20-Nov-05 15:11
Reanalyse20-Nov-05 15:11 
I am being driven mad trying to replace a path name in a string - trying to change an absolute to relative link in HTML code

An excerpt of the HTML is below
_________________________________________________________________________________________

\r\n
Forest Heights
"

______________________________________________________________________________________
I have successfully extracted the filename (C:\\htmlexport\\test_files\\img0.png) and used it to copy and rename the file, but all attempts to change the string in this excerpt using code like

string absolutefile;<br />
				absolutefile=htmlEditorControl1.BodyHtml.Substring(startind-1,endind-startind+5);<br />
//extract the file name from path<br />
string fname=Path.GetFileName(absolutefile);	<br />
string ftype=Path.GetExtension(absolutefile);<br />
string newdest =@fname;<br />
//this works<br />
File.Copy(absolutefile,newdest,true);<br />
<br />
returnstring=htmlEditorControl1.BodyHtml;<br />
//following line does not replace the "absolutefile" value with the "fname" value<br />
returnstring.Replace(@absolutefile,@fname);<br />

fails with no change to the string.

Does anyone have any experience with the "escaped" value substitution in a string ?
Thanks



-- modified at 21:12 Sunday 20th November, 2005
AnswerRe: String.Replace with Escaped Characters Pin
S. Senthil Kumar20-Nov-05 18:55
S. Senthil Kumar20-Nov-05 18:55 
QuestionDate Comparison Pin
tatchung20-Nov-05 15:07
tatchung20-Nov-05 15:07 
AnswerRe: Date Comparison Pin
Christian Graus20-Nov-05 15:43
protectorChristian Graus20-Nov-05 15:43 
GeneralRe: Date Comparison Pin
tatchung20-Nov-05 16:03
tatchung20-Nov-05 16:03 
QuestionHow to exact the tsk Pin
activesync20-Nov-05 13:53
activesync20-Nov-05 13:53 
QuestionNeed help with reading image from stream using GDI+ Pin
serguey_haftrige20-Nov-05 13:41
serguey_haftrige20-Nov-05 13:41 
AnswerRe: Need help with reading image from stream using GDI+ Pin
Curtis Schlak.20-Nov-05 14:26
Curtis Schlak.20-Nov-05 14:26 
GeneralRe: Need help with reading image from BUFFER using GDI+ Pin
serguey_haftrige22-Nov-05 15:49
serguey_haftrige22-Nov-05 15:49 
QuestionC# Process UseShellExecute query Pin
Kuira20-Nov-05 12:30
Kuira20-Nov-05 12:30 
AnswerRe: C# Process UseShellExecute query Pin
Xiangyang Liu 刘向阳20-Nov-05 13:37
Xiangyang Liu 刘向阳20-Nov-05 13:37 
QuestionHashtable - Get picked values Pin
Seraphin20-Nov-05 11:23
Seraphin20-Nov-05 11:23 
AnswerRe: Hashtable - Get picked values Pin
Christian Graus20-Nov-05 11:36
protectorChristian Graus20-Nov-05 11:36 
GeneralRe: Hashtable - Get picked values Pin
Seraphin20-Nov-05 11:51
Seraphin20-Nov-05 11:51 
GeneralRe: Hashtable - Get picked values Pin
Christian Graus20-Nov-05 11:53
protectorChristian Graus20-Nov-05 11:53 
GeneralRe: Hashtable - Get picked values Pin
Seraphin20-Nov-05 12:01
Seraphin20-Nov-05 12:01 
GeneralRe: Hashtable - Get picked values Pin
Christian Graus20-Nov-05 12:10
protectorChristian Graus20-Nov-05 12:10 
GeneralRe: Hashtable - Get picked values Pin
Seraphin20-Nov-05 12:17
Seraphin20-Nov-05 12:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.