code behind

M

Morris Neuman

Hi,

If I am not using a code behind page (.aspx.cs), where in the regular
content page would I include the using command (e.g. using System.Data.OleDb)?

The start of my aspx page is as follows:

<%@ Page Language="C#" MasterPageFile="~/MasterPage1.master"
Title="Admin-Manage Distribution List" %>

<script runat="server">

protected void LinkButton2_Click(object sender, EventArgs e)
{
DetailsView1.Visible = true;
SetFocus(DetailsView1);
//DetailsView1.Focus();
}


protected void DetailsView1_ItemInserted(object sender,
DetailsViewInsertedEventArgs e)
{
GridView1.DataBind();
}


protected void Page_Load(object sender, EventArgs e)
{

}
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<br />
<strong><span style="color: #000080; font-family: Verdana">
 
S

Steven Cheng

Hi Morris,


Quote from Morris==================================================
If I am not using a code behind page (.aspx.cs), where in the regular
content page would I include the using command (e.g. using
System.Data.OleDb)?
==================================================

To do this you can put the following tag above the <script> tag:
<% @Import Namespace=" System.Data.OleDb" %>

If you need further assistance please feel free to ask.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
M

Morris Neuman

Thanks. I put the <% @Import Namespace=" System.Data.OleDb" %>
in the test.aspx page and it worked without the code behind page.

--
Appreciate the help.

Morris


"Steven Cheng" said:
Hi Morris,


Quote from Morris==================================================
If I am not using a code behind page (.aspx.cs), where in the regular
content page would I include the using command (e.g. using
System.Data.OleDb)?
==================================================

To do this you can put the following tag above the <script> tag:
<% @Import Namespace=" System.Data.OleDb" %>

If you need further assistance please feel free to ask.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,039
Messages
2,570,375
Members
47,020
Latest member
anuradha

Latest Threads

Top