[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

How to display multiple and customisable horizontal scrollers which displays different RSS feed?

Asked by Mitzs in Programming for ASP.NET, .NET Framework 2.x

Tags: ASP.Net 2.0, IE 6.0 +

I am looking for a functionality of having 2 scrolling control like html marquee which can display data coming from different RSS feeds. I need to display this on one of our webpage of our website which uses Masterpage and developed in ASP.Net 2.0.
I like the quality of scrolling of text at (http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm). I have tried using this control but i had 2 issues with that. First of all i was not able to use the same control twice on the same form. This is becuase i am not an expert in ASP.Net + Java scripts. Second I am concatinating the titles of the feed which is displayed in the marquee. Because of lots of text to display the marquee shows the text by words and it jumpy.

The need to display this rss feed is we use 3rd party to suply us some information to us through web service and that stage takes about 30-40 second. This RSS feed  is to keep customer occupied while we are getting the data in backgroud. Has anyone come accross this kind of situation and what soulutions can be deployed at this point.

I am open for any suggestion , pointers to try but need to display this scrollers asap.


Mitesh



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
ASPX Page coding
 
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test1.aspx.vb" Inherits="Test1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
 
 
<script language="JavaScript1.2">
   //Specify the marquee's width (in pixels)
var marqueewidth="850px"
//Specify the marquee's height
var marqueeheight="23px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//configure background color:
var marqueebgcolor="#DEFDD9"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1
 
//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
 
var marqueecontent='<%=Session("test")%>';
//var marqueecontent='<nobr><font face="Arial">Thank you for visiting <a href="http://www.dynamicdrive.com">Dynamic Drive.</a> If you find this script useful, please consider linking to us by <a href="../link.htm">click here.</a> Enjoy your stay!</font></nobr>'
 
 
////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee
 
function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate
 
function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
 
}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}
 
if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
 
</body>
 
</html>
 
VB Code 
 
 
 
Option Explicit On
Option Strict On
 
 
Imports System.IO
Imports System.Resources
Imports System.Globalization
Imports System.Threading
Imports System.Xml
Imports System.Net
Imports System.Data
 
Partial Class Test1
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            BindRSSFeeds()
        End If
    End Sub
 
    Private Sub BindRSSFeeds()
 
        Try
 
            Dim myRSSFeed As New DataSet
            Dim MyWebProxy As WebProxy = New WebProxy(ConfigurationManager.AppSettings("ProxyAddress").ToString())
            MyWebProxy.BypassProxyOnLocal = True
            MyWebProxy.Credentials = New NetworkCredential(ConfigurationManager.AppSettings("ProxyUsername").ToString, ConfigurationManager.AppSettings("ProxyPassword").ToString, ConfigurationManager.AppSettings("ProxyDomain").ToString)
            Dim objWebRequest As System.Net.HttpWebRequest
            Dim objWebResponse As System.Net.HttpWebResponse
            Dim RSSURL As String = ConfigurationManager.AppSettings("RSSFeedURL").ToString
            objWebRequest = CType(System.Net.WebRequest.Create(RSSURL), System.Net.HttpWebRequest)
            objWebRequest.Proxy = MyWebProxy
            objWebRequest.PreAuthenticate = True
            objWebRequest.Accept = "*/*"
            objWebRequest.ContentType = "text/xml"
            objWebRequest.AllowAutoRedirect = True
            objWebRequest.UserAgent = "Mozilla/4.0 (compatible;" + " MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)"
            objWebResponse = CType(objWebRequest.GetResponse(), System.Net.HttpWebResponse)
            Dim mystreamreader As System.IO.StreamReader = New System.IO.StreamReader(objWebResponse.GetResponseStream())
 
            ' Dim doc As System.Xml.XmlDocument = New System.Xml.XmlDocument
 
            ' doc.Load(mystreamreader)
 
            myRSSFeed.ReadXml(mystreamreader)
 
 
          
            Dim x As String = ""
 
            If myRSSFeed.Tables("item").Rows.Count > 0 Then
 
 
                For i As Integer = 0 To myRSSFeed.Tables(2).Rows.Count - 1
 
     
                    x = x & " : " & myRSSFeed.Tables("item").Rows(i).Item("Title").ToString.Trim
 
                Next
            End If
            Session("test") = x.Trim
            'myfeed.Value = x.Trim
        Catch ex As Exception
 
            'return some error code.
 
        End Try
 
    End Sub
 
End Class
[+][-]09/25/08 09:44 AM, ID: 22571311Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/25/08 02:03 PM, ID: 22573848Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/28/08 09:47 AM, ID: 22591742Accepted Solution

View this solution now by starting your 30-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: Programming for ASP.NET, .NET Framework 2.x
Tags: ASP.Net 2.0, IE 6.0 +
Sign Up Now!
Solution Provided By: Mitzs
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_2_20070628