473,396 Members | 1,987 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,396 software developers and data experts.

How to pass content of aspx to method

How can I add logic to return the actual content of an aspx file in my method
below:

public override System.Web.Hosting.VirtualFile GetFile(string virtualPath)

{

//this is obviously not doing anything. I need to fill the 2nd
parameter below with the content retrieved from the file
\wwwroot\search\SearchResults.aspx
// MyVirtualFile(string virtualPath, string content)

return new MyVirtualFile("Search/", "I need to pass
SearchResults.aspx content here for the string parameter");

}
--
dba123
Jul 19 '06 #1
1 1183
How about reading the file content using System.IO namespace?

"dba123" <db****@discussions.microsoft.comwrote in message
news:4F**********************************@microsof t.com...
How can I add logic to return the actual content of an aspx file in my
method
below:

public override System.Web.Hosting.VirtualFile GetFile(string
virtualPath)

{

//this is obviously not doing anything. I need to fill the 2nd
parameter below with the content retrieved from the file
\wwwroot\search\SearchResults.aspx
// MyVirtualFile(string virtualPath, string content)

return new MyVirtualFile("Search/", "I need to pass
SearchResults.aspx content here for the string parameter");

}
--
dba123

Jul 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
16
by: Ekim | last post by:
hello, I'm allocating a byte-Array in C# with byte byteArray = new byte; Now I want to pass this byte-Array to a managed C++-function by reference, so that I'm able to change the content of the...
0
by: Daimy | last post by:
I meet the same problem below, please help me! Thanks! //written by some one I have developed a windows forms user control, which I am going to host in Internet Explorer.. I am familiar...
2
by: Marco Antonio Montalvo Durán | last post by:
hi for example, I have a page 'register.aspx' and open a second page 'popup.aspx', what I want to do is to pass the control and values obtained in 'popup.aspx' to 'register.aspx', somebody...
2
by: Jason Kester | last post by:
I have a UserControl living on MyPage.aspx. How would MyPage.aspx go about retrieving the HTML content generated by that UserControl as a string? I've looked into two options, neither of which...
13
by: Benjamin Smith | last post by:
I am controlling the display status of a table row using the following code. <TR id="CCRow" style="DISPLAY:none"> Instead of hard coding "none" above, I would like to change that value using a...
5
by: mark_hanson_eng | last post by:
How can I best pass user selected text to the server on a button click? I could use javascript document.selected and add javascript to a asp:button using Attributes.Add. Ideally I would fill the...
17
by: Rabbit | last post by:
Hi, On my 1st page, i have a function which gets a new ID value and need to transfer to another immediately. which I want to get in 2nd page using Request.form("txtID"), but doesn't work, the...
2
by: simon | last post by:
Hello, relatively new .net programmer. using vb.net (v2.0) I have an aspx page that contains 2 user controls (ascx) on it. the left control is basically navigation hyperlinks the right control...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.