|
Because you ask for a specific product, so IMHO you should check out their support site[^].
|
|
|
|
|
hello everybody,
i was trying to write the contents of my aspx page to an html file; but i have got an error like this The process cannot access the file 'c:\inetpub\wwwroot\Webexcel\temp.html' because it is being used by another process.""
does anybody know how to fix this.. pls help
thanks in advance
sebastian
|
|
|
|
|
You might want to try a SysInternal tool to check which process is holding the file, then you can think of how to solve the problem. If it is used by the ASP.NET due to the last write then you need to make sure that you release the file as soon as your writing code finishes.
|
|
|
|
|
thanks for your response,but i am creating the file dynamically @ runtime , and immediately after creation i am trying to write in to this. then the error fires ..
any other idea,,.
|
|
|
|
|
Can you post some of your relevant code?
|
|
|
|
|
yeah surely pls find the code below.
'namespaces
Imports System.Net
Imports System.io
' declarations
Dim mwreq As WebRequest
Dim mwresp As WebResponse
Dim sr As StreamReader
Dim strhtml As String
Dim sw As StreamWriter
'inside the button click
mwreq = WebRequest.Create("http://localhost/Webexcel/Default.aspx")
mwresp = mwreq.GetResponse()
sr = New StreamReader(mwresp.GetResponseStream)
strhtml = sr.ReadToEnd
sw = File.CreateText(Server.MapPath("temp.html"))
sw.WriteLine(strhtml)
Response.WriteFile(Server.MapPath("temp.html"))
this is code i have used,
i think you can sort out something.
nb: actually i am in india(time zone GMT + 5.30)
thats why the reply is so late. excuse:
bye
|
|
|
|
|
Sebastian T Xavier wrote: sw = File.CreateText(Server.MapPath("temp.html"))
sw.WriteLine(strhtml)
Here, you open a connection to write to the specified and the stream remains open, not closed yet.
Sebastian T Xavier wrote: Response.WriteFile(Server.MapPath("temp.html"))
Now, you are trying to open a new connection to the file that is being used by the sw stream. So no wonder that you get the error, in this case you either have to close the sw stream first before running the Response.Write method or use the current stream to keep writing to the file.
|
|
|
|
|
but the error occurs in the following line......
sw = File.CreateText(Server.MapPath("temp.html"))
see, can you execute this code segment in your pc.
ok thanks, once again.
|
|
|
|
|
But like I said, you still need to close the sw stream explicitly:
sw.WriteLine(strhtml)
sw.Close()
|
|
|
|
|
yeah its working now . thank you very much
|
|
|
|
|
Hi all,
I am using atlas (ajax) in my webpage,which contain textbox,timer and button.
In timer control I am calling function which change the text in textbox.
while tracing in code new value is assigned to textbox but it is not reflected in textbox.
If I call same function on button click this will assign new value to textbox and get reflected in textbox.
Why this is so.
Can anybody help me to solve this issue.
Regards,
Nagraj.
|
|
|
|
|
What does your code look like? Do you put the timer and textbox in the UpdatePanel control?
|
|
|
|
|
Hai to all,
How to use tabindex property in a table,how it will work if we use this property???Give me solution with an example.
Thanks in advance
kissy
|
|
|
|
|
Kissy16 wrote: Give me solution with an example.
Give me your paycheck.
only two letters away from being an asset
|
|
|
|
|
Thanls for ur repsonse.
Here i am giving my code,Can i display each cell(each cell is a panel)by using tabindex or button_click event???Wat i have to do for this???
in .vb or .aspx wat code i have to give.Is it possible to do so????
asp:Table id="Table2" runat="server" CellPadding="0" CellSpacing="0"
asp:TableRow
asp:TableCell
asp:Panel runat="server" ID="pnl1"
asp:Label runat="server" ID="lblname" text=Name/asp:Label
asp:TextBox runat="server" ID="Textbox5"/asp:TextBox
/asp:Panel/asp:TableCell
asp:TableCell
asp:Panel runat="server" ID="pnl2"
asp:Label runat="server" ID="label1"hello/asp:Label
asp:TextBox runat="server" ID="txtname"/asp:TextBox
/asp:Panel
/asp:TableCell/asp:TableRow/asp:Table
kissy
|
|
|
|
|
Hi, i have to mix the dll method and classic methods both.
i have pages created using ajax (ussing ajax dll). and now i have to go from one page to another without any postback or refreshing like google.
So please ne one can help to redirect from one page to another like google.
i cant modify my old pages which have ajax.
Thanks in advance
|
|
|
|
|
AJAX is used to refresh the contents of the page that is being displayed without postbacks, not to redirect to another page. To do a redirect you need to use something like Server.Redirect on the server or something like window.location on the client.
only two letters away from being an asset
|
|
|
|
|
Hi,
can anyone tell me how to write the code for this:
If any number stored as a string, how can we convert the string in to number.
I mean number 18 stored as a string. I want to retrieve this string as number. How can I write the code for this?
thanks,
Suketh
|
|
|
|
|
It's very complicated.
Int.Parse("18");
A little research, say 30 seconds, and you should have found the answer.
only two letters away from being an asset
|
|
|
|
|
Convert.ToInt32(s);
where "s" is your string value
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi
I have presure here,so please send me mail back if any one know about create alias for subdomain or domains using asp.net
ravi
|
|
|
|
|
Hello every one!!!!
if i open project in in .net i am getting the following error
visual studio .NET has detected that the specified web server is not
running ASP.NETversion 1.1. you will unable to run ASP.NET web
applications or services
and i check the in IIS in that my default website is in stopped mode
i tryed to start by right click and click the start button
but iam getting the following error unexpected error 08xffe2740 occured.
Please reply me.....
hai all please clarify mny doubts
|
|
|
|
|
Try running aspnet_regiis.exe to make sure .NET has been registered with IIS.
only two letters away from being an asset
|
|
|
|
|
go to command prompt type text like
> aspnet_regiis -i
then it solve the ur problem
|
|
|
|
|
I'm amazed how people don't read the previous responses to see if they are actually adding anything of value to the discussion.
only two letters away from being an asset
|
|
|
|