Click here to Skip to main content
15,884,629 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Regex URL problem - help needed! Pin
nzmike11-Oct-05 16:48
nzmike11-Oct-05 16:48 
QuestionIIS Pin
Nisha8010-Oct-05 22:33
Nisha8010-Oct-05 22:33 
AnswerRe: IIS Pin
Dave Kreskowiak11-Oct-05 6:51
mveDave Kreskowiak11-Oct-05 6:51 
AnswerRe: IIS Pin
Nuray15-Oct-05 0:22
Nuray15-Oct-05 0:22 
Questioninterview question Pin
Anonymous9-Oct-05 20:18
Anonymous9-Oct-05 20:18 
AnswerRe: interview question Pin
Colin Angus Mackay9-Oct-05 21:37
Colin Angus Mackay9-Oct-05 21:37 
GeneralRe: interview question Pin
Anonymous9-Oct-05 22:45
Anonymous9-Oct-05 22:45 
QuestionStreamWriter cutting short Pin
nim529-Oct-05 11:49
nim529-Oct-05 11:49 
What this code does is let me choose a file, like an article saved in a .rtf file and take the text from that and put it into a .html file. The problem I'm having is in the middle, in the part that writes "the BULK of the content to the new file". It stops writing the writing the content from the .rtf file to the new file after it has written so many characters.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim openStream As New FileStream(txt_BrowseDP.Text & ListBox_Browse.SelectedItem, FileMode.Open, FileAccess.Read)
Dim makeStream As New FileStream(txt_BrowseDP.Text & ListBox_Browse.SelectedItem & ".html", FileMode.CreateNew, FileAccess.Write)
Dim theReader As New StreamReader(openStream)
Dim theWriter As New StreamWriter(makeStream)
Dim BulkContent As String
'Write the FIRST part of content to new file
Try
theWriter.WriteLine("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN""")
theWriter.WriteLine("""http://www.w3.org/TR/xhtml1/DTD/strict.dtd'"">")
theWriter.WriteLine("<html>")
theWriter.WriteLine("<head>")
theWriter.WriteLine("<title></title>")
theWriter.WriteLine("<meta http-equiv=""content-type"" content=""text/html; charset=UTF-8"" />")
theWriter.WriteLine("<style type=""text/css"" media=""screen"" title=""Default"">@import url(../main.css);</style>")
theWriter.WriteLine("</head>")
theWriter.WriteLine("<body>")
theWriter.WriteLine("")
theWriter.WriteLine("<pre><div</pre> id=""container2"">")
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
'Write the BULK of the content to the new file
Try
theWriter.WriteLine("<p><strong>" & theReader.ReadLine() & "</strong></p>")
While theReader.Peek() > -1
If theReader.ReadLine() <> "" Then
theWriter.WriteLine("<p>" & theReader.ReadLine() & "</p>")
End If
End While
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
'Write the LAST part of the content to the new file and then close
theWriter.WriteLine("</div>")
theWriter.WriteLine("")
theWriter.WriteLine("<p><a href=""#container2"" accesskey=""c""></a></p>")
theWriter.WriteLine("")
theWriter.WriteLine("</body>")
theWriter.WriteLine("</html>")
openStream.Close()
makeStream.Close()
End Sub


-- modified at 19:37 Sunday 9th October, 2005
AnswerRe: StreamWriter cutting short Pin
Dave Kreskowiak9-Oct-05 14:38
mveDave Kreskowiak9-Oct-05 14:38 
GeneralRe: StreamWriter cutting short Pin
nim529-Oct-05 14:51
nim529-Oct-05 14:51 
AnswerRe: StreamWriter cutting short Pin
S. Senthil Kumar9-Oct-05 19:28
S. Senthil Kumar9-Oct-05 19:28 
Questionhow can i send SUM Parameter from Form to.. Pin
kings_19-Oct-05 8:45
kings_19-Oct-05 8:45 
QuestionHow to determine the installation directory in a setup project... Pin
Fredy8-Oct-05 6:57
Fredy8-Oct-05 6:57 
AnswerRe: How to determine the installation directory in a setup project... Pin
rwestgraham8-Oct-05 21:10
rwestgraham8-Oct-05 21:10 
AnswerRe: How to determine the installation directory in a setup project... Pin
Fredy9-Oct-05 8:31
Fredy9-Oct-05 8:31 
NewsNDoc for .NET v.2.0 Pin
jjrdk8-Oct-05 6:12
jjrdk8-Oct-05 6:12 
GeneralRe: NDoc for .NET v.2.0 - here's the XML Pin
Colin Angus Mackay8-Oct-05 8:30
Colin Angus Mackay8-Oct-05 8:30 
GeneralRe: NDoc for .NET v.2.0 - here's the XML Pin
jjrdk8-Oct-05 21:11
jjrdk8-Oct-05 21:11 
Question[&amp;#27714;&amp;#21161;]How to Get some account's ACLs on a folder? Pin
jsjszg7-Oct-05 22:10
jsjszg7-Oct-05 22:10 
QuestionSetting background issue for drawing application in .NETCF Pin
Sevu7-Oct-05 21:15
Sevu7-Oct-05 21:15 
AnswerRe: Setting background issue for drawing application in .NETCF Pin
S. Senthil Kumar7-Oct-05 23:01
S. Senthil Kumar7-Oct-05 23:01 
GeneralRe: Setting background issue for drawing application in .NETCF Pin
Sevu8-Oct-05 3:32
Sevu8-Oct-05 3:32 
GeneralRe: Setting background issue for drawing application in .NETCF Pin
S. Senthil Kumar8-Oct-05 19:46
S. Senthil Kumar8-Oct-05 19:46 
QuestionMFC v VC++.Net Pin
Klempie7-Oct-05 9:46
Klempie7-Oct-05 9:46 
AnswerRe: MFC v VC++.Net Pin
Kevin McFarlane8-Oct-05 9:01
Kevin McFarlane8-Oct-05 9:01 

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.