Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Applying conditions in aspx page



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> ASP & ASP.NET Forum
View previous topic :: View next topic  
Author Message
fozia_izhar



Joined: 29 May 2007
Posts: 1
Location: India

PostPosted: Tue May 29, 2007 10:12 am    Post subject: Applying conditions in aspx page Reply with quote

Hi freinds,

I want to execute code of my aspx page on the basis of "if and else condition".But now it is firing both if and else code, means it is not considering any conditional looping.Below is the code of my aspx page, please check where i m wrong.



<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>

<!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>
<form id="form1" runat="server">
<div>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<Columns>
<asp:HyperLinkField DataTextField ="heading_t" dataNavigateUrlFields ="navlinks_t" /></Columns>
</asp:GridView>
&nbsp;&nbsp;<br />

<asp:Repeater ID="rept" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<set-var lft="<%# eval("disptype") %>">
<if> <get-var lft="left"><then>
<table><tr><td>

<item id="<%# eval("links_t") %>">
<div class="news">
<b><span style="text-align:center; background-color:Lime; font-size:medium " ><%#Eval("heading_t")%></span></b>
</td></tr>
<tr><td>
<asp:Image ID="Image1" Height="60" Width="60" runat="server" />
</td>
<td><span style="background-color:Yellow; font-size:small; " ><%#Eval("comment_t")%></span>

</div></item>
</td></tr>
</table>
</then>
<else>
<table><tr><td>

<item id="<%# Eval("links_t") %>">
<div class="news">
<b><span style="text-align:center; background-color:Lime; font-size:medium " ><%#Eval("heading_t")%></span></b>
<br />

</td></tr>
<tr><td>
<span style="background-color:Yellow; font-size:small; " ><%#Eval("comment_t")%></span>
</td>
<td>
<asp:Image ID="imag1" Height="60" Width="60" runat="server" />
</div></item>
</td></tr>
</table>
</else>
</if>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>"
ProviderName="<%$ ConnectionStrings:ConnectionString1.ProviderName %>" SelectCommand="SELECT heading_t, comment_t, navlinks_t, links_t, imgurl, disptype, priority FROM user_news_t">
</asp:SqlDataSource>
&nbsp;

</div>
</form>
</body>
</html>



Pleeez tell me whats wrong with this code and how to correct it. Question
Pleeez reply.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> ASP & ASP.NET Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap