Images Load

Posted by Dotnetfundakumar under Regular Expressions on 9/3/2009 | Views : 1348 | Status : [Member] | Replies : 2
i need how to load pictures without post back in the here in winners & Prizes



Posted by: Lakhangarg on: 9/3/2009 [Member] [Moderator] Silver

either use ajax or javaScript ...

Fetch images name of all the winners in an array now fetch the image from array one by one. use SetTimeout to give pause.

Thanks & Regards
Lakhan Pal Garg

Dotnetfundakumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/3/2009 [Member] [MVP] [Administrator] NotApplicable

Good Day Dotnetfundakumar

I will not Allow people to Post the Same Question twice. Its not allowed here. After you have Posted something, please be patient until someone comes and reply to your post.

To load Pictures like Winners you can use a Add Rotator Control like this

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<asp:Timer ID="Timer_RightSecond" runat="server" OnTick="Timer_RightSecond_Tick">
&nbsp;<asp:AdRotator ID="AdRotator_RightSecond" runat="server" DataSourceID="XmlDataSourceRightSecond" />
<br />
<asp:XmlDataSource ID="XmlDataSourceRightSecond" runat="server" DataFile="~/RightSecond_Home.xml">
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />

Now what i did here i have placed an Add Rotator Control inside an Update Panel and after that i have put a timer Control and after Certain Intervals the Images will Change. Now let me show you how my XML looks like

<ImageUrl>~/images/Home/Banner Flat_Second_2/Office_Reliance.gif</ImageUrl>
<AlternateText>Office Reliance</AlternateText>
<Keyword>Office Reliance</Keyword>

<ImageUrl>~/images/Home/Banner Flat_Second_2/HealthSpa.gif</ImageUrl>
<AlternateText>Health Spa</AlternateText>
<Keyword>Health Spa</Keyword>


Now in the Timer Tick event you must Update the UpdatePanel so that it can do the partial update and add the Following code

 protected void Timer_RightSecond_Tick(object sender, EventArgs e)


Now after Certain intervals this will Display images Randonly. As you can see i have added the <NavigateUrl> tag , now this means if the image gets click , it will redirect the user to that url.

Thank you For Posting at Dotnetfunda. Please To cross post again.

Vuyiswa Maseko

Thank you for posting at Dotnetfunda

Dotnetfundakumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response