Showing posts with label idea. Show all posts
Showing posts with label idea. Show all posts

Monday, March 26, 2012

HTML file from database to user interface

Here is some sample/psuedo code. This should give you a good idea of
how to implement this.

<%@dotnet.itags.org. Control ClassName="DataBaseHtmlLiteral" %>

<script runat="server">
Public DataBaseID as integer

Sub OnPreRender
' create sql connection and command
SqlCmd = "Select TOP 1 [Table].[html] from [Table] WHERE [Table].
[IDField] = @dotnet.itags.org.ID"
SqlCmd.Parameters.add("@dotnet.itags.org.ID",DatabaseID)

HTML.Text = DirectCast(SqlCmd.ExecuteScalar(),String)
' clean up (close connection etc.)
End Sub
</script>

<asp:Literal ID="HTML" runat="server" />

Each instance requires the DataBaseID to be set.
This assumes a single instance of the html, if you are looping through
the table, do not use this. Don't want
Also, error catching is needed (row doesn't exist, column is null,
DataBaseID is null, etc)

Hope this helps!

Wednesday, March 21, 2012

HTML Clean up

this system was created by the previous developer.
The idea was to save formatted html for each news article directly to the database, which is then displayed on the article table.
this idea worked fine, but unfortunatly people are using dreamweaver, ms word, and the like to create this html.
Needless to say, nearly 25,000 articles in my database by now, the article table alone grew to about 650MB (80% of the database!).

So I'm going to create a new component for them to create articles.

but, while doing so, I was wondering if there is something one can do, to loop through the database and "clean up" the html or something?

Worse case scenario, i will just leave the existing articles as is, and new articles will have simple html, with a single stylesheet for all articles.

Just would have like to clean up existing articles. That messy htlm, and huge record are crippling the search functionality.You will need to know what sort of 'extra' features these web editors add. You can then use a regex search to go through all the records and remove them (without removing the innertext). You could use SQL for this by directly manipulating the database.
Don't forget to try it on a backup first.

html + aspx + reportmanager

I would like to create a portal application, to open some aspx pages
and also ReportManager from Reporting Services.
The idea is that my portal page will have a banner and a menu in html,
calling via iframe reportmanager or the aspx pages. Unfortunately the
apsx pages are having very different heights.
Due to this, iframe is not the right choice.
Any idea how I can solve it? What else I can do? The biggest
limitations is that ReportManager is not very customizable.
Please note that the reportviewer is not a solution for me. I would
definitely like to embedd ReportManager in a page.

html + aspx + reportmanager

I would like to create a portal application, to open some aspx pages
and also ReportManager from Reporting Services.
The idea is that my portal page will have a banner and a menu in html,
calling via iframe reportmanager or the aspx pages. Unfortunately the
apsx pages are having very different heights.
Due to this, iframe is not the right choice.
Any idea how I can solve it? What else I can do? The biggest
limitations is that ReportManager is not very customizable.
Please note that the reportviewer is not a solution for me. I would
definitely like to embedd ReportManager in a page.