473,657 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reference to current content page

i have a master page:

<%@ Master Language="C#" %>
<html>
<head>
<title>CRM - RDK Truck Sales & Service</title>
</head>
<body>
<form runat="server">
<asp:contentpla ceholder id="cphMainCont ent" runat="server"> Content
Here<asp:conten tplaceholder>
</form>
</body>
</html>
i have a content page:

<%@ Page Language="C#" MasterPageFile= "Base.maste r" %>
<script runat="server">
void btnSave_Click(O bject Sender, EventArgs E)
{
Response.Redire ct("editcustome r.aspx?CusId=" +
RDK.Data.Insert COCUS(Page));
}
</script>
<asp:content id="contentMain Content" contentplacehol derid="cphMainC ontent"
runat="server">
i have a bunch of controls here
<RDK:RDK_BaseBu tton ID="btnSave" Text="Save" runat="server"
OnClick="btnSav e_Click" />
</asp:content>
i have a cs file in my app_code directory:

namespace RDK
{
public class Data
{

public static string InsertCOCUS(Pag e p)
{
return p.Controls[0].ClientID;
}
}
}
when i call RDK.Data.Insert COCUS(Page) it passes a reference to the master
page instead of the content page. how can i pass a reference pointing to the
page i'm actually calling the method from? i nest content pages and i have
to be able to pass a reference to the page i'm actually working on. thank
you for your help.
Nov 19 '05 #1
0 1294

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
8097
by: mike p. | last post by:
I have a docbook xml file, and am using standard docbook 1.61.3 xsl stylesheets to do xhtml transform. Transform works fine when using MSXML. When I try to do the following using asp.net 1.1: private void Page_Load(object sender, System.EventArgs e) { // load content XslTransform trans = new XslTransform();
3
11376
by: MarkMurphy | last post by:
In a barebones website with one page, checking HttpContext.Current.Request.UserLanguages.Length in Page_Load of an ASPX page in the VS IDE in codebehind shows a value of 1. Then when I refresh the page with F5 from the browser it goes to the expected 16 -- the number of languages I have defined in IE6. I'm globalizing a site and could swear this was working at one point. I use the value at to pick the user's language. On affected...
4
411
by: hansiman | last post by:
Coming from classic asp, I'm a bit in the dark here. I want to dispaly the content of a file in a literal server control. I've created a class utils.vb Imports System.IO Public Class Utils Inherits System.Web.UI.Page
5
4029
by: Alphonse Giambrone | last post by:
How can I reference a page or user control's properties (such as viewstate) and controls from another class? TIA -- Alphonse Giambrone Email: a-giam at customdatasolutions dot us
6
1696
by: Binoy | last post by:
Hello, I am getting this error once in a while from my web sites. When I will refresh web browser, it goes off and sites are working fine. Directory structures and file names are as below- C:\WWW - corporate site, C:\WWW\default.aspx is the default page and this site works fine.
9
2171
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a usercontrol and all i'm really needing to do is get the selected value when the button is clicked on the form. Can someone tell what I need to include in my page to get this working ? Moe <><
6
6117
by: blash | last post by:
Can someone help me? I really don't have a clue. My company staff told me they often got such error: "Object reference not set to an instance of an object." when they are in search result page then tried to access 2nd, or 3rd, etc page. The problem is it happens sometimes - sometimes when they clicked refresh button, then everything is ok. Now they told me it happens more frequently. but I have tried by myself many times and never got...
2
1970
by: | last post by:
Hi all, How can I get a reference to my custom profile provider in my .aspx page? I have looked at httpcontext.current.profile. But from there where do I go? Ideally I would like to be able to get default profile provider without having to know the "name" configured in web.config. TIA!
3
2566
by: SAL | last post by:
I am getting the following ERROR in my WebApp on line 30: Server Error in '/TestWebApp' Application. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.