|
I have the need to load an aspx page that has server controls on it, into an existing element on another page. The server controls are compiled into a dll and contain embedded javascript, css and image files that are needed for the controls to work and look correct.
In a nutshell I want to load a page into a variable, access it's rendered HTML and apply that HTML into the innerHTML of an existing <div> or <asp:panel>, retaining any enbedded scripts, styles and images loaded.
Is this possible and if so, can anyone provide me with an example?
Or am I going about this in the wrong way?
Is there an easier way to load an aspx page into an existing element?
Really quite stuck and sick of googling...
Andy
|
|
|
|
|
Do you want the rendered html code in a server side variable? if yes then why u need it?
Cheers!!
Brij
|
|
|
|
|
yes, that's what I think I need, but am not sure if that'd be enough...
My main site consists of a master page (page.master) and one child page (exec.aspx). The content of exec.aspx is generated dynamically using code behind and custom wrote server controls, depending on where the user has navigated to via menus, links or events. All this is done ajax style so I'm avoiding any and all page reloads...
I have a need to include easy to write static pages that can be modified outside of the main code (by another developer), which would at some point be loaded dynamically and displayed to the user with the existing site layout.
Thnx
Andy
|
|
|
|
|
DuelMonster_Coder wrote: I have a need to include easy to write static pages that can be modified outside of the main code (by another developer), which would at some point be loaded dynamically and displayed to the user with the existing site layout.
Not clear about this part !!
|
|
|
|
|
A static page would consist of just a bit of text, an image or two, or a collection of information contained within a multi-panel accordion style server control.
I need this compiled into it's resulting HTML and entered into an existing element on the currently loaded page.
Thnx
Andy
|
|
|
|
|
Your question is not clear..
G. Satish
|
|
|
|
|
Would an iframe do the job for you?
|
|
|
|
|
Possibly...
I think I know the basic concept of an iframe, but I've never looked into using one before.
I seem to have a note in my head that they are a bad thing, but don't remember where that came from...
----------
Edit...
----------
I've just tried this and it's close to what I want, but the page I'm going to be loading doesn't know about the main sites css and won't ever.
So the resulting page loaded into the iframe doesn't match the main site style and I need it to.
Thnx
Andy
modified on Monday, December 8, 2008 9:08 AM
|
|
|
|
|
You want to look at writing a custom VirtualPathProvider and|or HttpHandler (this is what i did when faced with similar problem).
[EDIT] To be more clear, i also had to rework the way i modelled the system, i used a master page as the wrapper and the 'generated' pages used it as their master. The master can also be generated.
[/EDIT]
Or, load the custom page, compile it in code behind (i've never done this), then insert compiled code in existing div ... ok, this is what you said you want to do, sorry.
What does the url look like to distinguish between the various embedded pages ?
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
hello to every one,
kavita here. i am developing a website with some filed and check boxs. this i want a code in VB.Net or C#.Net to convert web page/iframe or anything like some space of webpage sholud be converted to pdf.
becuse i have to send this pdf to other member and again he will check the check boxs this works like in cycle. so please help in the loggic as well as code.and i have to fininsh this within 5 days. please tell me soon
thanks in advance.
kavita
Email:kavitachawoor@indiatimes.com
|
|
|
|
|
You have 5 days in which to either write or buy a PDF library, I guess. I would say that writing one is almost certainly not going to happen.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I Guess iTextSharp.text.pdf namespace will help you.
so google the sample code.
happy Searching...........
|
|
|
|
|
To convert webpage to pdf or need to read anything from pdf,
just you go trhough google for itextsharp dlls.
By using this dll's u can get all those things..
i think this codeproject site..itself contains the code for this...
check once
G. Satish
|
|
|
|
|
|
Hi all,
In my repeater control i have done a simple if condition as below
<%if(((Estate)Container.DataItem).Invoiced) %>
<%{ %>
<td>
Invoiced
</td>
<%}else{ % >
<td>
Not Invoiced
</td>
<%} % >
Estate is my DTO class
When i run this code i am getting a error as below
The name 'Container' does not exist in the current context
What is the reason for this error.
Please suggest me.
Thank you
Know is Drop, Unknown is Ocean
|
|
|
|
|
The name container, does not exist in this specific context.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Exelioindia wrote:
What is the reason for this error.
Because,
Exelioindia wrote: The name 'Container' does not exist in the current context
|
|
|
|
|
i am setting in web.config file
<customerrors mode="OFF">
this code but still i getting error- runtime error on server in mozilla firefox--- how to solve this problem
senthil
|
|
|
|
|
Please post properly
Cheers!!
Brij
|
|
|
|
|
Member 3636217 wrote: i am setting in web.config file
this code
Where is the code ?
When you are puting web.config code , please select "Ignore HTML tags in this message (good for code snippets)" Checkbox in the bottom of Editor.
|
|
|
|
|
I encountered a crystal report deployment problem.
I make reports with Crystal Report for Visual Studio .NET 2008. It works fine in the development machine (windows xp). And then I deployed it on a windows server 2003 system (with .net framework 3.5), the report gives error about "Logon Failed".
Other than the crystal report part, the web application accesses the sql server database via asp.net, and it works well.
If I restarted the machine, it works ok. And if installed on a windows xp with .net framwork 3.5, it works ok too.
Any help or hints are appreciated.
Thanks!
Arun
|
|
|
|
|
It would be easiest to set your Sql login details in your webconfig file.
<appSettings>
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
<add key="Server" value="Sername" />
<add key="DataBase" value="Company" />
<add key="Userid" value="sa" />
<add key="Password" value="thePassword" />
</appSettings>
Then in your code behind file
string Svr = ConfigurationManager.AppSettings["Server"];
string UserId = ConfigurationManager.AppSettings["Userid"];
string PassWd = ConfigurationManager.AppSettings["Password"];
string DB = ConfigurationManager.AppSettings["DataBase"];
string ReportPath = Server.MapPath("FactoryCopy.rpt");
crReportDocument.Load(ReportPath);
crConnectionInfo.ServerName = Svr;
crConnectionInfo.DatabaseName = DB;
crConnectionInfo.UserID = UserId;
crConnectionInfo.Password = PassWd;
crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
{
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
|
|
|
|
|
The error occurred while exporting, not in loading data.
|
|
|
|
|
dear all,
how to get a specific word from a sentence considering the blank spaces also (sql query).
kissy
|
|
|
|
|
Hi Kissy,
you could use regular expressions. Do you need a sql query to get the word from the sentence, or can you do this in code?
Regards
Sebastian
|
|
|
|