473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Access Web Form Control

I have a simple Wizard
page.aspx
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" >
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Main">

<Acme:Main runat="server" id="MainWC" />

</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

with a web control
page.ascx
<asp:DropDownList ID="CorrectionType" runat="server">
<asp:ListItem Value="None" Selected=True>None</asp:ListItem>
<asp:ListItem Value="Gift">Gift</asp:ListItem>
<asp:ListItem Value="Membership">Membership</asp:ListItem>
<asp:ListItem Value="Gift and Membership">Gift and
Membership</asp:ListItem>
</asp:DropDownList>
I'm trying to set the "CorrectionType.Text" value equal to a
code-behind file Session Variable.
like
page.aspx.cs
Sesssion["CorrectionType"] = MainWC.CorrectionType.Text;

Basically, trying to set the CorrectionType on a Web Control equal to a
Session in the code-behind file.

Oh, when I try this I get:

'ASP.development_z1_forms_main_ascx.CorrectionType ' is inaccessible due
to its protection level..
Thanks.

Jan 18 '07 #1
3 1241
Try something like this:

DropDownList ddlCorrectionType =
(DropDownList)MainWC.FindControl("CorrectionType") ;
Session["CorrectionType"] = ddlCorrectionType.Text;

Regards,
Brian K. Williams

<ch********@yahoo.comwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...
>I have a simple Wizard
page.aspx
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" >
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Main">

<Acme:Main runat="server" id="MainWC" />

</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

with a web control
page.ascx
<asp:DropDownList ID="CorrectionType" runat="server">
<asp:ListItem Value="None" Selected=True>None</asp:ListItem>
<asp:ListItem Value="Gift">Gift</asp:ListItem>
<asp:ListItem Value="Membership">Membership</asp:ListItem>
<asp:ListItem Value="Gift and Membership">Gift and
Membership</asp:ListItem>
</asp:DropDownList>
I'm trying to set the "CorrectionType.Text" value equal to a
code-behind file Session Variable.
like
page.aspx.cs
Sesssion["CorrectionType"] = MainWC.CorrectionType.Text;

Basically, trying to set the CorrectionType on a Web Control equal to a
Session in the code-behind file.

Oh, when I try this I get:

'ASP.development_z1_forms_main_ascx.CorrectionType ' is inaccessible due
to its protection level..
Thanks.

Jan 18 '07 #2
You Rock! That worked. Is there an online resource that has more
information on Web Control topics that you recommend?
Thanks.
vj

Brian Williams wrote:
Try something like this:

DropDownList ddlCorrectionType =
(DropDownList)MainWC.FindControl("CorrectionType") ;
Session["CorrectionType"] = ddlCorrectionType.Text;

Regards,
Brian K. Williams

<ch********@yahoo.comwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...
I have a simple Wizard
page.aspx
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" >
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Main">

<Acme:Main runat="server" id="MainWC" />

</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

with a web control
page.ascx
<asp:DropDownList ID="CorrectionType" runat="server">
<asp:ListItem Value="None" Selected=True>None</asp:ListItem>
<asp:ListItem Value="Gift">Gift</asp:ListItem>
<asp:ListItem Value="Membership">Membership</asp:ListItem>
<asp:ListItem Value="Gift and Membership">Gift and
Membership</asp:ListItem>
</asp:DropDownList>
I'm trying to set the "CorrectionType.Text" value equal to a
code-behind file Session Variable.
like
page.aspx.cs
Sesssion["CorrectionType"] = MainWC.CorrectionType.Text;

Basically, trying to set the CorrectionType on a Web Control equal to a
Session in the code-behind file.

Oh, when I try this I get:

'ASP.development_z1_forms_main_ascx.CorrectionType ' is inaccessible due
to its protection level..
Thanks.
Jan 18 '07 #3
My favorite place for code examples is http://www.codeproject.com or
http://www.gotdotnet.com
and don't forget about the newsgroup
microsoft.public.dotnet.framework.aspnet.webcontro ls.
NP, glad I could help...
Brian

<ch********@yahoo.comwrote in message
news:11**********************@s34g2000cwa.googlegr oups.com...
You Rock! That worked. Is there an online resource that has more
information on Web Control topics that you recommend?
Thanks.
vj

Brian Williams wrote:
>Try something like this:

DropDownList ddlCorrectionType =
(DropDownList)MainWC.FindControl("CorrectionType" );
Session["CorrectionType"] = ddlCorrectionType.Text;

Regards,
Brian K. Williams

<ch********@yahoo.comwrote in message
news:11*********************@a75g2000cwd.googlegr oups.com...
>I have a simple Wizard
page.aspx
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" >
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Main">

<Acme:Main runat="server" id="MainWC" />

</asp:WizardStep>
</WizardSteps>
</asp:Wizard>

with a web control
page.ascx
<asp:DropDownList ID="CorrectionType" runat="server">
<asp:ListItem Value="None" Selected=True>None</asp:ListItem>
<asp:ListItem Value="Gift">Gift</asp:ListItem>
<asp:ListItem Value="Membership">Membership</asp:ListItem>
<asp:ListItem Value="Gift and Membership">Gift and
Membership</asp:ListItem>
</asp:DropDownList>
I'm trying to set the "CorrectionType.Text" value equal to a
code-behind file Session Variable.
like
page.aspx.cs
Sesssion["CorrectionType"] = MainWC.CorrectionType.Text;

Basically, trying to set the CorrectionType on a Web Control equal to a
Session in the code-behind file.

Oh, when I try this I get:

'ASP.development_z1_forms_main_ascx.CorrectionType ' is inaccessible due
to its protection level..
Thanks.

Jan 19 '07 #4

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

Similar topics

4
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
3
by: Sean | last post by:
Have you ever wanted to add the great features inherent in Google Maps? Here is how you do it. ============== == STEP ONE == ============== Create a new MS Access form called frmGoogleMap....
16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
1
by: Arend Jan Nijenhuis | last post by:
Hi, I'm fairly new to .Net, but an expert in Microsoft Access VBA. For a large Access application, I want to create some sort of custom control (COM interop?) in VB.Net, to be used in an Access...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.