N
nuhura01
Hi..
I'm trying to save query path which is in text box to text file. Below
is the coding that i'm using currently:
Private Sub SaveQueryPath()
'save to text file
Response.Clear()
Response.Buffer = True
Response.AddHeader("content-disposition",
"attachment;filename=Query1.txt")
Response.ContentType = "application/vnd.text"
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Me.EnableViewState = False
Dim oStringWriter As System.IO.StringWriter = New
System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New
System.Web.UI.HtmlTextWriter(oStringWriter)
Me.ClearControls(txtPath)
txtPath.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End()
End Sub
The 'txtPath' is the text box that contains a query path that I want
to save.
However, when i open the text file, after i run and save the query,
the result in the text file shows the query path (which i need)
including the properties of the text box which is unnecessary for me.
For example(text saved):
<input name="txtPath" type="text" value=" > STP > --Select One-- >
" id="txtPath" disabled="disabled" style="background-
color:WhiteSmoke;font-family:Verdana;font-size:X-Small;width:712px;" /
The only thing that i want to save is (the query path): value=" > STP
unnecessary info saved in the text file?
Hope to hear from you guys... Your help is highly appreciated.
Thank you.
I'm trying to save query path which is in text box to text file. Below
is the coding that i'm using currently:
Private Sub SaveQueryPath()
'save to text file
Response.Clear()
Response.Buffer = True
Response.AddHeader("content-disposition",
"attachment;filename=Query1.txt")
Response.ContentType = "application/vnd.text"
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Me.EnableViewState = False
Dim oStringWriter As System.IO.StringWriter = New
System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New
System.Web.UI.HtmlTextWriter(oStringWriter)
Me.ClearControls(txtPath)
txtPath.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End()
End Sub
The 'txtPath' is the text box that contains a query path that I want
to save.
However, when i open the text file, after i run and save the query,
the result in the text file shows the query path (which i need)
including the properties of the text box which is unnecessary for me.
For example(text saved):
<input name="txtPath" type="text" value=" > STP > --Select One-- >
" id="txtPath" disabled="disabled" style="background-
color:WhiteSmoke;font-family:Verdana;font-size:X-Small;width:712px;" /
The only thing that i want to save is (the query path): value=" > STP
Is there anybody can help me on how to get rid of all the other--Select One-- > "
unnecessary info saved in the text file?
Hope to hear from you guys... Your help is highly appreciated.
Thank you.