473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Read and write .aspx file through vb.net code

maliksleo
115 100+
Hi

my problem is that i want to generate a .aspx file at runtime using vb.net code
how is it possible help me
user will enter his code in the area provided and i wnat to generate the file having that code if any one have any idea how this will happen then plz guide me

maliksleo
Jun 1 '09 #1
6 4497
balame2004
142 100+
You Write code into a new file and save it as .aspx file by using IO.File objects.
Jun 1 '09 #2
After save according to the previous poster you can read the below post which will help you a lot:
http://www.devcity.net/Articles/128/1/article.aspx

Regards
<link removed>
Jun 1 '09 #3
Frinavale
9,735 Expert Mod 8TB
@maliksleo
This is a rather dangerous requirement.

An anonymous web user will be able to supply code to the server and execute it...

Are you Sure that you want to allow anyone (including malicious users) to be able to execute their own code on your sever?

They could do some real damage!
Jun 1 '09 #4
maliksleo
115 100+
@Frinavale
yes i know but my requirement is just like that no problem i have the solution for that malicious users the code will not run on the upload by the user. First of all that code will be reviewed and then placed on the server and any thing dangerous found then that user will be blocked.
Any how this is another story first of all i have to read and write the .aspx file using IO.file objects

maliksleo
Jun 2 '09 #5
maliksleo
115 100+
i have a new thing in my mind can i change the extenssion of a file from .txt to .aspx
or copy the .txt file to another location with .aspx extenssion
if it is possible then please tell me i am waiting

maliksleo
Jun 2 '09 #6
Frinavale
9,735 Expert Mod 8TB
ASPX pages are compiled when they are requested unless they are precompiled.
Therefore, if you place the ASPX page in a website that is hosting the proper .NET framework it will be compiled and executed when it is requested.
Jun 2 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: David Arden Stevensonn | last post by:
Say I have an XML file on my website that gets read alot (by a c# aspx page) but written to occasionally (also by the same c# aspx page) . Its a simple caching situation based on time. Example: If...
4
by: Lingyun Yang | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Dear all, I have a file it's binary data viewed in UltraEdit is EF BB BF 0D 0A 3C ....... I want to read them into a int or long...
1
by: JohnSmith | last post by:
I suspect this is easy, but I have been stumped for a day trying to solve this.. I want to be able to have an unlimited number of aspx pages that all use the code in one class file. I want code...
5
by: Just Me | last post by:
Using streams how do I write and then read a set of variables? For example, suppose I want to write into a text file: string1,string2,string3 Then read them later. Suppose I want to write...
2
by: David Lozzi | last post by:
Howdy, Trying to open and read/write another aspx file from my aspx page. Basically I want to be able to update my aspx files from the website. Here's my code so far: Dim path As String =...
4
by: =?Utf-8?B?ai5hLiBoYXJyaW1hbg==?= | last post by:
Hi, I have read the "how to's" on MSDN including this one, http://msdn2.microsoft.com/en-us/library/36b93480.aspx, on reading/writing files in C#, but haven't found something that I can put...
5
by: newsaboutgod | last post by:
I think VB.NET drives some people crazy because some simple VB6 things seem so hard. Here is some VB6 code: 'Write CSV File open "c:\test.csv" for output as #1 write#1, "1","2","3","4","5"...
4
by: Curious | last post by:
I have a file to which I'll need to at first read until it locates the last line of string. According to content of the last line of string, I'll need to write something to this file right after...
3
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I have an xsd that I want to save as an XML string to store in a DB I can save as a physical file using xsd.WriteXml(@"C:\Temp\Junk\junk.xml"); But I am unable to save to a string so I...
3
by: Laura | last post by:
Hi: ¿How can I read a file on the client side without loading it to the server?
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.