Advertisement

07.08.2008 at 06:41AM PDT, ID: 23546583
[x]
Attachment Details

Re-Engineering Question

Asked by theclassic in .NET, JavaScript, Programming for ASP.NET

Tags: asp.net, vb, javascript, All

Hello All, anyone wanna put their thinking caps on, here goes.....

I am coming in to a situation where a scrolling messageboard on a plain html page, complete with a seperate administrator page to update the scrolling text, must be re-engineered.  The messageboard application was written in asp.net (for the admin page) using a third party .dll (WebExportTechnologies.RTE) that is not allowed, the funmctions were jscript, with VB functions used to get the messages stored in an access DB file.  Here is a list of the files...

admin.aspx (for the admin page to update the content, using a RTE providfed by a 3rd party .dll)
functions.vb (gets the content from the access db)
messages.aspx (parses the information and is called on the .html page where a div calls the content)
messageboard.mdb(holds messages updated by admin) and index.html(where the messages scroll)

While this application and content manager are great, they need to come down, but retain the messages.  Basically I am looking to leverage the existing code so as I can just hand code the messages from the backend, and I believe this will be simple, but I am having a tough time figuring on how to proceed - I am a mid level programmer at best, and was just the assistant...now I am the only one!!!

Here is the code on the messages.aspx page that calls the content from function.vb....

dim dsMessages as dataset
    sub page_load()            
        if not page.IsPostBack() then
         dsMessages = GetEnabledMessages()
    end if
end sub

and underneath it is where the function is written that controls the messages appearance....

var currentMessageIndex = 0
var ns4 = (document.layers)? true:false;
var msie = (document.all)? true:false;

var messages = new Array(<%= dsMessages.tables(0).rows().count %>);

<%
      dim intMessageCount as integer = 0
      dim drMessage as datarow
      for each drMessage in dsMessages.tables(0).rows
            response.write ("messages[" & intMessageCount & "] = """ & server.htmlDecode(server.htmlEncode(drMessage("Message"))) & """;" & vbcrlf)
            intMessageCount += 1
      next
%>

function startMessageBoard(){
      document.getElementById("innerDiv").innerHTML = messages[currentMessageIndex];
      window.setTimeout("moveMessagesUp()", 0);
}
....ETC...

I believe I can simply use this page to write a new function that enables me to get rid of the need for the functions.vb, the DB, and the admin page.  I feel like dsMessages = GetEnabledMessages() ,
where GetEnabledMessages() can be a new function is the way to go...GetEnabledMessages()  on the functions page is written as this, just so you know...

function GetEnabledMessages() as dataset
            Dim strConnection as String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("messageBoard.mdb")
            dim strSQL as string = "SELECT * FROM Messages WHERE isEnabled=true ORDER BY Precedence"
            dim objDataSet as new DataSet()
            dim objConnection as new oledbconnection(strConnection)            
            dim objAdapter as new oledbdataadapter(strSQL, objConnection)
            objAdapter.fill(objDataSet)
            return objDataSet
      end function

This is my first job out of college.  Have mercy on me, it is fairly easy I believe, but I posted it as expert as so whoever can help grasps the concepts I am speaking about.  I actually helped write this app, but had guidance that is no longer working here....Thanks, and let me know if you need any more information!!!Start Free Trial
[+][-]07.08.2008 at 07:06AM PDT, ID: 21953942

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:15AM PDT, ID: 21954027

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:29AM PDT, ID: 21954162

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:37AM PDT, ID: 21954244

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:39AM PDT, ID: 21954261

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, JavaScript, Programming for ASP.NET
Tags: asp.net, vb, javascript, All
Sign Up Now!
Solution Provided By: DarkoLord
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.08.2008 at 07:44AM PDT, ID: 21954296

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:53AM PDT, ID: 21954379

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:59AM PDT, ID: 21954440

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 08:00AM PDT, ID: 21954453

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628