Click here to Skip to main content
15,917,862 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: custom control event not firing Pin
g00fyman6-Sep-06 1:47
g00fyman6-Sep-06 1:47 
GeneralRe: custom control event not firing Pin
minhpc_bk6-Sep-06 2:01
minhpc_bk6-Sep-06 2:01 
GeneralRe: custom control event not firing Pin
g00fyman6-Sep-06 2:12
g00fyman6-Sep-06 2:12 
GeneralRe: custom control event not firing Pin
minhpc_bk6-Sep-06 2:27
minhpc_bk6-Sep-06 2:27 
GeneralRe: custom control event not firing Pin
g00fyman6-Sep-06 2:39
g00fyman6-Sep-06 2:39 
Questionhow to write into the .htm file Pin
Amit Agarrwal5-Sep-06 23:21
Amit Agarrwal5-Sep-06 23:21 
AnswerRe: how to write into the .htm file Pin
Exelioindia5-Sep-06 23:48
Exelioindia5-Sep-06 23:48 
AnswerRe: how to write into the .htm file [modified] Pin
g00fyman5-Sep-06 23:53
g00fyman5-Sep-06 23:53 
if the source file is never changed, i.e you always save as a different file and use the source file as a template, this may help.

add a comment into the HTML file, like:

then just do a string replace like so.

string str = System.IO.File.ReadAllText(filepath);
str.Replace("<!-- {PLACEHOLDER} -->", "some text to put into the HTML file");

System.IO.File.WriteAllText(savepath);


otherwise if the file is always changing and you are always needing to insert and not remove then this may help

string str = System.IO.File.ReadAllText(filepath);
str.Replace("</body>", "<script type=\"text/javascript\">alert('script inserted');</script></body>");

System.IO.File.WriteAllText(savepath);


otherwise you will need to use regular expressions i think, unless you can supply more information

hope that helps

g00fy
GeneralRe: how to write into the .htm file Pin
Amit Agarrwal6-Sep-06 0:11
Amit Agarrwal6-Sep-06 0:11 
GeneralRe: how to write into the .htm file Pin
g00fyman6-Sep-06 0:16
g00fyman6-Sep-06 0:16 
GeneralRe: how to write into the .htm file Pin
Amit Agarrwal6-Sep-06 0:20
Amit Agarrwal6-Sep-06 0:20 
GeneralRe: how to write into the .htm file [modified] Pin
g00fyman6-Sep-06 0:29
g00fyman6-Sep-06 0:29 
GeneralRe: how to write into the .htm file Pin
Amit Agarrwal6-Sep-06 1:08
Amit Agarrwal6-Sep-06 1:08 
GeneralRe: how to write into the .htm file Pin
g00fyman6-Sep-06 1:40
g00fyman6-Sep-06 1:40 
GeneralRe: how to write into the .htm file Pin
Amit Agarrwal7-Sep-06 0:00
Amit Agarrwal7-Sep-06 0:00 
QuestionClose window if download complete Pin
Paddy Boyd5-Sep-06 22:38
Paddy Boyd5-Sep-06 22:38 
AnswerRe: Close window if download complete Pin
g00fyman6-Sep-06 3:55
g00fyman6-Sep-06 3:55 
QuestionAutodownload in asp.net(c#) Pin
Malayil alex5-Sep-06 22:18
Malayil alex5-Sep-06 22:18 
AnswerRe: Autodownload in asp.net(c#) Pin
g00fyman6-Sep-06 3:59
g00fyman6-Sep-06 3:59 
QuestionMessage in EventLog from a web service Pin
BLOEDHOND5-Sep-06 22:00
BLOEDHOND5-Sep-06 22:00 
AnswerRe: Message in EventLog from a web service Pin
minhpc_bk6-Sep-06 2:16
minhpc_bk6-Sep-06 2:16 
QuestionHow to remove centre line for gridview ? Pin
cheeken2u5-Sep-06 21:30
cheeken2u5-Sep-06 21:30 
AnswerRe: How to remove centre line for gridview ? Pin
g00fyman6-Sep-06 4:13
g00fyman6-Sep-06 4:13 
QuestionHow IIS manages reuests? Pin
RoyRose785-Sep-06 21:28
RoyRose785-Sep-06 21:28 
AnswerRe: How IIS manages reuests? Pin
BLOEDHOND5-Sep-06 22:04
BLOEDHOND5-Sep-06 22:04 

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.