This little problem is driving me nuts!!
On my webform page I create 2 variables..
Protected p_dml As String = "I"
Public Const mwv_id As Integer = 0
' originally had mwv_id as Protected
then in my form button click I set up my context items..
Private Sub btnAddRecord_Cl ick(ByVal sender As System.Object, ByVal e
As System.EventArg s) Handles btnAddRecord.Cl ick
Dim mwindicator As Integer
Context.Items.A dd ("Table",Me.lst tables.Selected Value)
Context.Items ("p_dml") = p_dml
Context.Items ("mwv_id") = mwv_id
Context.Items ("WageAmount ") = Me.txtAmount.Te xt
Context.Items ("MWindicato r") =
Convert.ToInt16 (Me.cbIndicator .checked)
Context.Items ("DateEffective ") = Me.txtDateEff.T ext
Context.Items ("DateExpire ") = Me.txtDateExpir e.Text
Context.Items ("Rate_Type" ) = Me.ddlrate_type .SelectedValue
Context.Items(" Province") = Me.ddlProvinces .SelectedValue
Context.Items ("Variation_id" ) = Me.ddlVariation s.SelectedValue
Context.Items ("Jurisdiction_ id") = Me.ddljurisdict ion.SelectedVal ue
'Response.Write ("mwv_id = " & mwv_id & "<br>")
'Response.Write ("so context mwv+id = " & Context.Items ("mwv_id"))
Server.Transfer ("index.aspx?ac tion=act_add_re cord", True)
End Sub
So on my act_add_record. ascx I send everything to an oracle package..
but it bombs..
So when I response .write out my context vars..
Response.Write ("Table is " & Context.Items ("Table") & "<br>")
Response.Write ("MWV_ID is " & Context.Items ("wmv_id") & "<br>")
Response.Write ("p_dml is " & Context.Items ("p_dml") & "<br>")
Response.Write ("Province is " & Context.Items ("Province") & "<br>")
Response.Write ("Rate type is " & Context.Items ("Rate_Type" ) &
"<br>")
Response.Write ("Wage Amount is " & Context.Items ("WageAmount ") &
"<br>")
Response.Write ("Indicator is " & Context.Items ("MWindicato r") &
"<br>")
Response.Write ("Effective date is " & Context.Items ("DateEffective ")
& "<br>")
Response.Write ("Expiry date is " & Context.Items ("DateExpire ")&
"<br>")
Response.Write ("Jurisdiction_ id is " & Context.Items
("Jurisdiction_ id")& "<br>")
Response.Write ("Variation_ id is " & Context.Items ("Variation_id" )&
"<br>")
Everything shows as expected but the mwv_id is blank (which I suspect
is why my package bombs)!!
Table is MINIMUM_WAGE
MWV_ID is
p_dml is I
Province is 36
Rate type is 1
Wage Amount is 9.99
Indicator is 1
Effective date is 2004-11-29
Expiry date is 2004-11-30
Jurisdiction_id is 1
Variation_id is 0
Can anyone see what I've done wrong!
tia
Dave 2 1712
Dave,
I don't see the specific problem, but why wouldn't you simply access mwv_id
directly ? It's a public constant, you can simply access it from the
index.aspx's codebehind (or any other class) via
PageName.mwv_id
like, if your webform is like this:
public class SomePage
Inherits System.Web.UI.P age
protected p_dml as string = "I"
public const mwv_id as Integer = 0
...
end class
you can access mwv_id from anywhere via:
SomePage.mwv_id
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"dave" <dr****@canoema il.com> wrote in message
news:da******** *************** ***@posting.goo gle.com... This little problem is driving me nuts!!
On my webform page I create 2 variables..
Protected p_dml As String = "I"
Public Const mwv_id As Integer = 0
' originally had mwv_id as Protected
then in my form button click I set up my context items..
Private Sub btnAddRecord_Cl ick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnAddRecord.Cl ick
Dim mwindicator As Integer
Context.Items.A dd ("Table",Me.lst tables.Selected Value)
Context.Items ("p_dml") = p_dml Context.Items ("mwv_id") = mwv_id
Context.Items ("WageAmount ") = Me.txtAmount.Te xt Context.Items ("MWindicato r") = Convert.ToInt16 (Me.cbIndicator .checked) Context.Items ("DateEffective ") = Me.txtDateEff.T ext Context.Items ("DateExpire ") = Me.txtDateExpir e.Text Context.Items ("Rate_Type" ) = Me.ddlrate_type .SelectedValue Context.Items(" Province") = Me.ddlProvinces .SelectedValue Context.Items ("Variation_id" ) = Me.ddlVariation s.SelectedValue Context.Items ("Jurisdiction_ id") = Me.ddljurisdict ion.SelectedVal ue 'Response.Write ("mwv_id = " & mwv_id & "<br>") 'Response.Write ("so context mwv+id = " & Context.Items ("mwv_id"))
Server.Transfer ("index.aspx?ac tion=act_add_re cord", True)
End Sub
So on my act_add_record. ascx I send everything to an oracle package.. but it bombs..
So when I response .write out my context vars..
Response.Write ("Table is " & Context.Items ("Table") & "<br>") Response.Write ("MWV_ID is " & Context.Items ("wmv_id") & "<br>") Response.Write ("p_dml is " & Context.Items ("p_dml") & "<br>") Response.Write ("Province is " & Context.Items ("Province") & "<br>") Response.Write ("Rate type is " & Context.Items ("Rate_Type" ) & "<br>") Response.Write ("Wage Amount is " & Context.Items ("WageAmount ") & "<br>") Response.Write ("Indicator is " & Context.Items ("MWindicato r") & "<br>") Response.Write ("Effective date is " & Context.Items ("DateEffective ") & "<br>") Response.Write ("Expiry date is " & Context.Items ("DateExpire ")& "<br>") Response.Write ("Jurisdiction_ id is " & Context.Items ("Jurisdiction_ id")& "<br>") Response.Write ("Variation_ id is " & Context.Items ("Variation_id" )& "<br>")
Everything shows as expected but the mwv_id is blank (which I suspect is why my package bombs)!!
Table is MINIMUM_WAGE MWV_ID is p_dml is I Province is 36 Rate type is 1 Wage Amount is 9.99 Indicator is 1 Effective date is 2004-11-29 Expiry date is 2004-11-30 Jurisdiction_id is 1 Variation_id is 0
Can anyone see what I've done wrong!
tia Dave
thx Karl
your solution works great, and exposes my lack of oop understanding.
its still odd that the p_dml variable comes through the
server.transfer unscathed but mwv_id becomes a blank..
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:<OP******* *******@TK2MSFT NGP10.phx.gbl>. .. Dave, I don't see the specific problem, but why wouldn't you simply access mwv_id directly ? It's a public constant, you can simply access it from the index.aspx's codebehind (or any other class) via
PageName.mwv_id
like, if your webform is like this:
public class SomePage Inherits System.Web.UI.P age
protected p_dml as string = "I" public const mwv_id as Integer = 0
... end class
you can access mwv_id from anywhere via: SomePage.mwv_id
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"dave" <dr****@canoema il.com> wrote in message news:da******** *************** ***@posting.goo gle.com... This little problem is driving me nuts!!
On my webform page I create 2 variables..
Protected p_dml As String = "I"
Public Const mwv_id As Integer = 0
' originally had mwv_id as Protected
then in my form button click I set up my context items..
Private Sub btnAddRecord_Cl ick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnAddRecord.Cl ick
Dim mwindicator As Integer
Context.Items.A dd ("Table",Me.lst tables.Selected Value)
Context.Items ("p_dml") = p_dml Context.Items ("mwv_id") = mwv_id
Context.Items ("WageAmount ") = Me.txtAmount.Te xt Context.Items ("MWindicato r") = Convert.ToInt16 (Me.cbIndicator .checked) Context.Items ("DateEffective ") = Me.txtDateEff.T ext Context.Items ("DateExpire ") = Me.txtDateExpir e.Text Context.Items ("Rate_Type" ) = Me.ddlrate_type .SelectedValue Context.Items(" Province") = Me.ddlProvinces .SelectedValue Context.Items ("Variation_id" ) = Me.ddlVariation s.SelectedValue Context.Items ("Jurisdiction_ id") = Me.ddljurisdict ion.SelectedVal ue 'Response.Write ("mwv_id = " & mwv_id & "<br>") 'Response.Write ("so context mwv+id = " & Context.Items ("mwv_id"))
Server.Transfer ("index.aspx?ac tion=act_add_re cord", True)
End Sub
So on my act_add_record. ascx I send everything to an oracle package.. but it bombs..
So when I response .write out my context vars..
Response.Write ("Table is " & Context.Items ("Table") & "<br>") Response.Write ("MWV_ID is " & Context.Items ("wmv_id") & "<br>") Response.Write ("p_dml is " & Context.Items ("p_dml") & "<br>") Response.Write ("Province is " & Context.Items ("Province") & "<br>") Response.Write ("Rate type is " & Context.Items ("Rate_Type" ) & "<br>") Response.Write ("Wage Amount is " & Context.Items ("WageAmount ") & "<br>") Response.Write ("Indicator is " & Context.Items ("MWindicato r") & "<br>") Response.Write ("Effective date is " & Context.Items ("DateEffective ") & "<br>") Response.Write ("Expiry date is " & Context.Items ("DateExpire ")& "<br>") Response.Write ("Jurisdiction_ id is " & Context.Items ("Jurisdiction_ id")& "<br>") Response.Write ("Variation_ id is " & Context.Items ("Variation_id" )& "<br>")
Everything shows as expected but the mwv_id is blank (which I suspect is why my package bombs)!!
Table is MINIMUM_WAGE MWV_ID is p_dml is I Province is 36 Rate type is 1 Wage Amount is 9.99 Indicator is 1 Effective date is 2004-11-29 Expiry date is 2004-11-30 Jurisdiction_id is 1 Variation_id is 0
Can anyone see what I've done wrong!
tia Dave This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: palouf |
last post by:
Hi everybody.
I try to build some Outlook 2000 / XP Addin,
It works fine with the XP version, but with OL 2k, nothing to do, it never
quits outlook (i can see it in the process list) I read in a microsoft
article that this could happen when all the Com_object instances are not set
to null. This is what i have done ((or seems to)) but it doesn't quit too.
So my questions are following :
1 . is there a way to see in one round alla the...
|
by: Dennis C. Drumm |
last post by:
Is there a way to modify the standard context menu shown when someone right
clicks in a windows text box and that would work for all open windows
applications?
The standard context menu for a text box has 6 items, undo, cut, copy,
paste, delete and select all. I would like to add one additional paste menu
that opens a new sub menu with several optional text items that could be
pasted. The items would be populated by my program but...
|
by: David Berman |
last post by:
Hello, I'm receiving an error reading the machine.config file when I try
to access my web application. This error came out of nowhere. After
searching many sites, googelizing and searching here, I've found others
with the same problem but no resolution. The problem for me (and for
others) came out of nowhere.
Here's the error message:
>>>>> START <<<<<
Server Error in '/MyApp' Application....
|
by: Roman |
last post by:
Which is better when passing values between forms?
|
by: Eric |
last post by:
Hi all,
I have a web form that inherits from a base class. I try to access
Context.Items in the base class, during the Page_Load event, and find
that it is empty. When I try to access Context.Items from the derived
web form, it is populated with the value I would expect.
This creates a difficulty because I ALWAYS want to retrieve a given
value from Context.Items for all pages derived from my base class.
| |
by: nicholas |
last post by:
I'm using context to transfer variables from 1 page to another.
But, with more than 2 pages it fails.
Ex:
page1.aspx:
Context.Items.Add("customername", customername.text)
Server.Transfer("page2.aspx")
page2.aspx:
response.write(Context.Items("customername")) => returns the customername
|
by: Hugo Flores |
last post by:
Often people post questions about how did they loose their context
between pages, and the more common cause is that they don't store the
context on the viewstate upon postbacks.
Mine is the other way around. Even though I don't fill the context
object, I still get it after the Page Load event. May be I'm not
understanding the context object quite well.
Next is the code, and I know this wouldn't regularly transfer the
context to the next...
|
by: goRide |
last post by:
Hi,
I'm looking of a way (preferred - a ready class or dll) to customize
the context menu.
many application has more controls inside the context menu (like
textbox, sliders, checkbox, panel etc').
is there a way making this without writing my own context menu
(meaning, popup form or something) ?
Please don't post commercial products to this topic
thanks.
|
by: MCM |
last post by:
I'm working on a plotting control. The plotting control will have a context
menu with basic commands for "scaling", "zooming", etc. Is there a way
that, from the parent form, I can add more commands to the control's context
menu?
I'm envisioning a case where the control has a set of context menu items,
and the parent form also has a set of context menu items.
Thanks.
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |