bhuraasif
May 21st, 2007, 07:17 AM
hello everyone
in 2003 ASP.NET (C#). i created one include file(for_date.inc)
code in this file are given below.this is working very fine.as i want.
but the problem is that this same code i copied in another application in 2005(C#). it doesnt run.
Please help me out and show me how to write inc file in 2005 (C#).
waiting fo reply.
<%@ Import namespace=" System.Web.UI.HtmlControls "%>
<%@ Import namespace="System.Web.UI.WebControls "%>
<%@ Import namespace="System.Web.UI "%>
<%@ Import namespace="System.Web.SessionState "%>
<%@ Import namespace="System.Web "%>
<%@ Import namespace="System.Configuration "%>
<%@ Import namespace="System.Drawing "%>
<%@ Import namespace="System.Data.SqlClient "%>
<%@ Import namespace="System.Data "%>
<%@ Import namespace="System.ComponentModel "%>
<%@ Import namespace=" System.Collections "%>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href=../styles/styles.css type=text/css rel=stylesheet>
<script language=JavaScript src=../scripts/script.js type=text/JavaScript></script>
<%
SqlConnection conbiz = new SqlConnection(ConfigurationSettings.AppSettings["DBConnection"]);
conbiz.Open();
SqlCommand cmdbiz = new SqlCommand();
cmdbiz.CommandType = CommandType.StoredProcedure;
cmdbiz.CommandText = "SP_Inc";
cmdbiz.Connection= conbiz;
SqlDataAdapter sda = new SqlDataAdapter(cmdbiz);
DataSet dst = new DataSet();
sda.Fill(dst);
repbiz.DataSource = dst.Tables[2];
repbiz.DataBind();
conne.Close();
%>
<TABLE id="main" cellSpacing="0" cellPadding="0" width="217" border="0" height="418">
<TR>
<TD height="113" width="231" vAlign="top"><FONT size="1"></FONT>
<TABLE id="Table4" borderColor="#ffffff" cellSpacing="0" cellPadding="0" width="215" border="0">
<TR bgcolor="#cccccc">
<TD height="18">
<P align="center"><STRONG><FONT face="Tahoma" color="#660000" size="2">LATEST BUSINESS ARTICLES</FONT></STRONG></P>
</TD>
</TR>
<TR>
<td width="245" height="74">
<asp:Repeater id="repbiz" runat="server">
<ItemTemplate>
<a href='../Business/<%#DataBinder.Eval(Container.DataItem,"page_path")%>' class="linkingtext" name='<%#DataBinder.Eval(Container.DataItem,"news_map")%>' target="_blank">
-
<%#DataBinder.Eval(Container.DataItem,"news_head")%>
<br>
</a>
</ItemTemplate>
</asp:Repeater>
</td>
</TR>
<tr>
<td align="right"><a href="files/Newslink.aspx?newslink=Business" class="linkingtext">more..</a></td>
</tr>
</TABLE>
</TD>
</TR>
</TABLE>
in 2003 ASP.NET (C#). i created one include file(for_date.inc)
code in this file are given below.this is working very fine.as i want.
but the problem is that this same code i copied in another application in 2005(C#). it doesnt run.
Please help me out and show me how to write inc file in 2005 (C#).
waiting fo reply.
<%@ Import namespace=" System.Web.UI.HtmlControls "%>
<%@ Import namespace="System.Web.UI.WebControls "%>
<%@ Import namespace="System.Web.UI "%>
<%@ Import namespace="System.Web.SessionState "%>
<%@ Import namespace="System.Web "%>
<%@ Import namespace="System.Configuration "%>
<%@ Import namespace="System.Drawing "%>
<%@ Import namespace="System.Data.SqlClient "%>
<%@ Import namespace="System.Data "%>
<%@ Import namespace="System.ComponentModel "%>
<%@ Import namespace=" System.Collections "%>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href=../styles/styles.css type=text/css rel=stylesheet>
<script language=JavaScript src=../scripts/script.js type=text/JavaScript></script>
<%
SqlConnection conbiz = new SqlConnection(ConfigurationSettings.AppSettings["DBConnection"]);
conbiz.Open();
SqlCommand cmdbiz = new SqlCommand();
cmdbiz.CommandType = CommandType.StoredProcedure;
cmdbiz.CommandText = "SP_Inc";
cmdbiz.Connection= conbiz;
SqlDataAdapter sda = new SqlDataAdapter(cmdbiz);
DataSet dst = new DataSet();
sda.Fill(dst);
repbiz.DataSource = dst.Tables[2];
repbiz.DataBind();
conne.Close();
%>
<TABLE id="main" cellSpacing="0" cellPadding="0" width="217" border="0" height="418">
<TR>
<TD height="113" width="231" vAlign="top"><FONT size="1"></FONT>
<TABLE id="Table4" borderColor="#ffffff" cellSpacing="0" cellPadding="0" width="215" border="0">
<TR bgcolor="#cccccc">
<TD height="18">
<P align="center"><STRONG><FONT face="Tahoma" color="#660000" size="2">LATEST BUSINESS ARTICLES</FONT></STRONG></P>
</TD>
</TR>
<TR>
<td width="245" height="74">
<asp:Repeater id="repbiz" runat="server">
<ItemTemplate>
<a href='../Business/<%#DataBinder.Eval(Container.DataItem,"page_path")%>' class="linkingtext" name='<%#DataBinder.Eval(Container.DataItem,"news_map")%>' target="_blank">
-
<%#DataBinder.Eval(Container.DataItem,"news_head")%>
<br>
</a>
</ItemTemplate>
</asp:Repeater>
</td>
</TR>
<tr>
<td align="right"><a href="files/Newslink.aspx?newslink=Business" class="linkingtext">more..</a></td>
</tr>
</TABLE>
</TD>
</TR>
</TABLE>