473,837 Members | 1,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Property values disappear on postback

Hi,

I make use of properties to store values that are relevant to the page but
this time I am posting the page to itself and the values are Zero or null
(they disappear). is there any other way I can store them/preserve them so
that when I post back I can use the values.
I tried session and it works but some other ideas would be helpful.

Appreciate your help,
Stephen
Aug 14 '06 #1
8 2265
Can you be more specific? What properties of what objects are you setting?
How are you setting them? When are you setting them?
"stephen" <st********@hot mail.comwrote in message
news:u2******** ********@TK2MSF TNGP04.phx.gbl. ..
Hi,

I make use of properties to store values that are relevant to the page but
this time I am posting the page to itself and the values are Zero or null
(they disappear). is there any other way I can store them/preserve them so
that when I post back I can use the values.
I tried session and it works but some other ideas would be helpful.

Appreciate your help,
Stephen

Aug 14 '06 #2
Hi Scott,

Thanks for the reply, This is my task. I take an itemnumber, saledate
retieve all info (there can be multiple values) and display it on a grid.
then the user can click on a specific value and now I take the values again
(this time 3 values... itemnumber, saledate and OpType) and retieve info and
display on another grid.

So the first time a user inputs itemnumber and saledate.. and clicks the
button I store it in properties like this
Public Property SPItemNumber() As integer
Get
Return viewstate("SPIt emNumber")

End Get
Set(ByVal Value As integer)
ViewState("SPIt emNumber") = Value

End Set
End Property

Public Property SPSaleDate() As Date
Get
Return viewstate("SPSa leDate")

End Get
Set(ByVal Value As Date)
ViewState("SPSa leDate") = Value

End Set
End Property
I set it when i user clicks the button to get the information
(firstDatagrid) and this has a itemtemplate like this
<asp:TemplateCo lumn HeaderText="Op Type" ItemStyle-HorizontalAlign ="Center">
<ItemTemplate >
<asp:HyperLin k runat="server" id="OPLink" text='<%#
DataBinder.Eval (Container.Data Item, "optype") %>' NavigateUrl='<% #
"default.aspx?o ptype=" & Container.DataI tem("optype") %>' />
</ItemTemplate>
</asp:TemplateCol umn>

but it clears out when I click on the link.... i know it posts to the same
page... but why does the property value cleared?

Thanks,
Stephen


"Scott M." <s-***@nospam.nosp amwrote in message
news:uF******** ********@TK2MSF TNGP05.phx.gbl. ..
Can you be more specific? What properties of what objects are you
setting? How are you setting them? When are you setting them?
"stephen" <st********@hot mail.comwrote in message
news:u2******** ********@TK2MSF TNGP04.phx.gbl. ..
>Hi,

I make use of properties to store values that are relevant to the page
but this time I am posting the page to itself and the values are Zero or
null (they disappear). is there any other way I can store them/preserve
them so that when I post back I can use the values.
I tried session and it works but some other ideas would be helpful.

Appreciate your help,
Stephen


Aug 14 '06 #3
Well what is this property a property of? And, I also don't see any lines
of code that actually call the set portion of your properties.

When are you writing this code:

SPItemNumber = something
SPSaleDate = something
"stephen" <st********@hot mail.comwrote in message
news:us******** **********@TK2M SFTNGP04.phx.gb l...
Hi Scott,

Thanks for the reply, This is my task. I take an itemnumber, saledate
retieve all info (there can be multiple values) and display it on a grid.
then the user can click on a specific value and now I take the values
again (this time 3 values... itemnumber, saledate and OpType) and retieve
info and display on another grid.

So the first time a user inputs itemnumber and saledate.. and clicks the
button I store it in properties like this
Public Property SPItemNumber() As integer
Get
Return viewstate("SPIt emNumber")

End Get
Set(ByVal Value As integer)
ViewState("SPIt emNumber") = Value

End Set
End Property

Public Property SPSaleDate() As Date
Get
Return viewstate("SPSa leDate")

End Get
Set(ByVal Value As Date)
ViewState("SPSa leDate") = Value

End Set
End Property
I set it when i user clicks the button to get the information
(firstDatagrid) and this has a itemtemplate like this
<asp:TemplateCo lumn HeaderText="Op Type"
ItemStyle-HorizontalAlign ="Center">
<ItemTemplate >
<asp:HyperLin k runat="server" id="OPLink" text='<%#
DataBinder.Eval (Container.Data Item, "optype") %>' NavigateUrl='<% #
"default.aspx?o ptype=" & Container.DataI tem("optype") %>' />
</ItemTemplate>
</asp:TemplateCol umn>

but it clears out when I click on the link.... i know it posts to the same
page... but why does the property value cleared?

Thanks,
Stephen


"Scott M." <s-***@nospam.nosp amwrote in message
news:uF******** ********@TK2MSF TNGP05.phx.gbl. ..
>Can you be more specific? What properties of what objects are you
setting? How are you setting them? When are you setting them?
"stephen" <st********@hot mail.comwrote in message
news:u2******* *********@TK2MS FTNGP04.phx.gbl ...
>>Hi,

I make use of properties to store values that are relevant to the page
but this time I am posting the page to itself and the values are Zero or
null (they disappear). is there any other way I can store them/preserve
them so that when I post back I can use the values.
I tried session and it works but some other ideas would be helpful.

Appreciate your help,
Stephen



Aug 14 '06 #4
Hi Scott,

I am sorry.. i do it at the click event of a button so that it sets the
values that were in the respective textboxes
e.g
SPItemNumber = integer.parse(t extbox1.text)
SPSaleDate = date.parse(text box2.text)
I set the values first then call the stp for the first Datagrid and then
bind it.... then on clicking the "HyperLink" in the datagrid postback to the
same page, call another STP (3 parameters) and bind the second datagrid

Am i presenting the situation correctly this time,
Thanks,
Stephen

"Scott M." <s-***@nospam.nosp amwrote in message
news:eL******** ******@TK2MSFTN GP03.phx.gbl...
Well what is this property a property of? And, I also don't see any lines
of code that actually call the set portion of your properties.

When are you writing this code:

SPItemNumber = something
SPSaleDate = something
"stephen" <st********@hot mail.comwrote in message
news:us******** **********@TK2M SFTNGP04.phx.gb l...
>Hi Scott,

Thanks for the reply, This is my task. I take an itemnumber, saledate
retieve all info (there can be multiple values) and display it on a grid.
then the user can click on a specific value and now I take the values
again (this time 3 values... itemnumber, saledate and OpType) and retieve
info and display on another grid.

So the first time a user inputs itemnumber and saledate.. and clicks the
button I store it in properties like this
Public Property SPItemNumber() As integer
Get
Return viewstate("SPIt emNumber")

End Get
Set(ByVal Value As integer)
ViewState("SPIt emNumber") = Value

End Set
End Property

Public Property SPSaleDate() As Date
Get
Return viewstate("SPSa leDate")

End Get
Set(ByVal Value As Date)
ViewState("SPSa leDate") = Value

End Set
End Property
I set it when i user clicks the button to get the information
(firstDatagrid ) and this has a itemtemplate like this
<asp:TemplateC olumn HeaderText="Op Type"
ItemStyle-HorizontalAlign ="Center">
<ItemTemplat e>
<asp:HyperLin k runat="server" id="OPLink" text='<%#
DataBinder.Eva l(Container.Dat aItem, "optype") %>' NavigateUrl='<% #
"default.aspx? optype=" & Container.DataI tem("optype") %>' />
</ItemTemplate>
</asp:TemplateCol umn>

but it clears out when I click on the link.... i know it posts to the
same page... but why does the property value cleared?

Thanks,
Stephen


"Scott M." <s-***@nospam.nosp amwrote in message
news:uF******* *********@TK2MS FTNGP05.phx.gbl ...
>>Can you be more specific? What properties of what objects are you
setting? How are you setting them? When are you setting them?
"stephen" <st********@hot mail.comwrote in message
news:u2****** **********@TK2M SFTNGP04.phx.gb l...
Hi,

I make use of properties to store values that are relevant to the page
but this time I am posting the page to itself and the values are Zero
or null (they disappear). is there any other way I can store
them/preserve them so that when I post back I can use the values.
I tried session and it works but some other ideas would be helpful.

Appreciate your help,
Stephen



Aug 14 '06 #5
Not yet. When you have questions of this kind, it's best to provide us with
your code (not just bits and pieces). Let's see all your code.

I think the problem is you are trying to set the property values once they
are already gone.

"stephen" <st********@hot mail.comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Hi Scott,

I am sorry.. i do it at the click event of a button so that it sets the
values that were in the respective textboxes
e.g
SPItemNumber = integer.parse(t extbox1.text)
SPSaleDate = date.parse(text box2.text)
I set the values first then call the stp for the first Datagrid and then
bind it.... then on clicking the "HyperLink" in the datagrid postback to
the same page, call another STP (3 parameters) and bind the second
datagrid

Am i presenting the situation correctly this time,
Thanks,
Stephen

"Scott M." <s-***@nospam.nosp amwrote in message
news:eL******** ******@TK2MSFTN GP03.phx.gbl...
>Well what is this property a property of? And, I also don't see any
lines of code that actually call the set portion of your properties.

When are you writing this code:

SPItemNumber = something
SPSaleDate = something
"stephen" <st********@hot mail.comwrote in message
news:us******* ***********@TK2 MSFTNGP04.phx.g bl...
>>Hi Scott,

Thanks for the reply, This is my task. I take an itemnumber, saledate
retieve all info (there can be multiple values) and display it on a
grid. then the user can click on a specific value and now I take the
values again (this time 3 values... itemnumber, saledate and OpType) and
retieve info and display on another grid.

So the first time a user inputs itemnumber and saledate.. and clicks the
button I store it in properties like this
Public Property SPItemNumber() As integer
Get
Return viewstate("SPIt emNumber")

End Get
Set(ByVal Value As integer)
ViewState("SPIt emNumber") = Value

End Set
End Property

Public Property SPSaleDate() As Date
Get
Return viewstate("SPSa leDate")

End Get
Set(ByVal Value As Date)
ViewState("SPSa leDate") = Value

End Set
End Property
I set it when i user clicks the button to get the information
(firstDatagri d) and this has a itemtemplate like this
<asp:Template Column HeaderText="Op Type"
ItemStyle-HorizontalAlign ="Center">
<ItemTemplate >
<asp:HyperLin k runat="server" id="OPLink" text='<%#
DataBinder.Ev al(Container.Da taItem, "optype") %>' NavigateUrl='<% #
"default.aspx ?optype=" & Container.DataI tem("optype") %>' />
</ItemTemplate>
</asp:TemplateCol umn>

but it clears out when I click on the link.... i know it posts to the
same page... but why does the property value cleared?

Thanks,
Stephen


"Scott M." <s-***@nospam.nosp amwrote in message
news:uF****** **********@TK2M SFTNGP05.phx.gb l...
Can you be more specific? What properties of what objects are you
setting? How are you setting them? When are you setting them?
"stephen" <st********@hot mail.comwrote in message
news:u2***** ***********@TK2 MSFTNGP04.phx.g bl...
Hi,
>
I make use of properties to store values that are relevant to the page
but this time I am posting the page to itself and the values are Zero
or null (they disappear). is there any other way I can store
them/preserve them so that when I post back I can use the values.
I tried session and it works but some other ideas would be helpful.
>
Appreciat e your help,
Stephen
>




Aug 15 '06 #6
Hi Scott,

Sorry for the late late reply...
here is the code that I use
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
setValues() --Setting basic values
SPOpType = Request.QuerySt ring("optype")
If Not SPOpType = "" Then
getDetails()
makeVisible() --Making Panels Visible

Else
makeInvisible() --Making Panels InVisible

End If

End If
End Sub

Private Sub btnGrid_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnGrid.Click
Dim dsCompare As DataSet
SPItemNumber = integer.parse(t xtEVID.Text)
SPSaleDate = date.parse(txtS Date.Text)
Try
dsCompare = db.GetCompare(S PItemNumber, SPSaleDate)
If Not dsCompare Is Nothing Then
SPDGCompare = dsCompare
dgCompare.DataS ource = dsCompare
dgCompare.DataB ind()
pnlCompare.Visi ble = True

End If

Catch ex As Exception
errLog.LogIt("B inding Compare Grid Error", ex, "")

End Try

End Sub

Private Sub getDetails()
Dim ds As DataSet
Dim dsSum As DataSet
Try
dgCompare.DataS ource = SPDGCompare
dgCompare.DataB ind()

Catch ex As Exception
errLog.LogIt("B inding Grid1 Error", ex, "")

End Try

Try
ds = db.GetDetails1( SPItemNumber, SPSaleDate, SAPOpType)
dgScroll.DataSo urce = ds
dgScroll.DataBi nd()
Catch ex As Exception
errLog.LogIt("B inding Grid2 Error", ex, "")

End Try
Try
dsSum = db.GetDetails2( SPItemNumber, SPSaleDate, SAPOpType)
dgSummary.DataS ource = dsSum
dgSummary.DataB ind()

Catch ex As Exception
errLog.LogIt("B inding Grid3 Error", ex, "")

End Try
End Sub

Public Property SPItemNumber() As integer
Get
Return viewstate("SPIt emNumber")

End Get
Set(ByVal Value As integer)
ViewState("SPIt emNumber") = Value

End Set
End Property

Public Property SPSaleDate() As Date
Get
Return viewstate("SPSa leDate")

End Get
Set(ByVal Value As Date)
ViewState("SPSa leDate") = Value

End Set
End Property

Public Property SPOpType() As String
Get
Return viewstate("SPOp Type")

End Get
Set(ByVal Value As String)
ViewState("SPOp Type") = Value

End Set
End Property

Public Property SPDGCompare() As DataSet
Get
Return viewstate("SPDG Compare")

End Get
Set(ByVal Value As DataSet)
ViewState("SPDG Compare") = Value

End Set
End Property


"Scott M." <s-***@nospam.nosp amwrote in message
news:e%******** ********@TK2MSF TNGP02.phx.gbl. ..
Not yet. When you have questions of this kind, it's best to provide us
with your code (not just bits and pieces). Let's see all your code.

I think the problem is you are trying to set the property values once they
are already gone.

"stephen" <st********@hot mail.comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>Hi Scott,

I am sorry.. i do it at the click event of a button so that it sets the
values that were in the respective textboxes
e.g
SPItemNumber = integer.parse(t extbox1.text)
SPSaleDate = date.parse(text box2.text)
I set the values first then call the stp for the first Datagrid and then
bind it.... then on clicking the "HyperLink" in the datagrid postback to
the same page, call another STP (3 parameters) and bind the second
datagrid

Am i presenting the situation correctly this time,
Thanks,
Stephen

"Scott M." <s-***@nospam.nosp amwrote in message
news:eL******* *******@TK2MSFT NGP03.phx.gbl.. .
>>Well what is this property a property of? And, I also don't see any
lines of code that actually call the set portion of your properties.

When are you writing this code:

SPItemNumbe r = something
SPSaleDate = something
"stephen" <st********@hot mail.comwrote in message
news:us****** ************@TK 2MSFTNGP04.phx. gbl...
Hi Scott,

Thanks for the reply, This is my task. I take an itemnumber, saledate
retieve all info (there can be multiple values) and display it on a
grid. then the user can click on a specific value and now I take the
values again (this time 3 values... itemnumber, saledate and OpType)
and retieve info and display on another grid.

So the first time a user inputs itemnumber and saledate.. and clicks
the button I store it in properties like this
Public Property SPItemNumber() As integer
Get
Return viewstate("SPIt emNumber")

End Get
Set(ByVal Value As integer)
ViewState("SPIt emNumber") = Value

End Set
End Property

Public Property SPSaleDate() As Date
Get
Return viewstate("SPSa leDate")

End Get
Set(ByVal Value As Date)
ViewState("SPSa leDate") = Value

End Set
End Property
I set it when i user clicks the button to get the information
(firstDatagr id) and this has a itemtemplate like this
<asp:Templat eColumn HeaderText="Op Type"
ItemStyle-HorizontalAlign ="Center">
<ItemTemplat e>
<asp:HyperLin k runat="server" id="OPLink" text='<%#
DataBinder.E val(Container.D ataItem, "optype") %>' NavigateUrl='<% #
"default.asp x?optype=" & Container.DataI tem("optype") %>' />
</ItemTemplate>
</asp:TemplateCol umn>

but it clears out when I click on the link.... i know it posts to the
same page... but why does the property value cleared?

Thanks,
Stephen


"Scott M." <s-***@nospam.nosp amwrote in message
news:uF***** ***********@TK2 MSFTNGP05.phx.g bl...
Can you be more specific? What properties of what objects are you
setting? How are you setting them? When are you setting them?
>
>
"stephen" <st********@hot mail.comwrote in message
news:u2**** ************@TK 2MSFTNGP04.phx. gbl...
>Hi,
>>
>I make use of properties to store values that are relevant to the
>page but this time I am posting the page to itself and the values are
>Zero or null (they disappear). is there any other way I can store
>them/preserve them so that when I post back I can use the values.
>I tried session and it works but some other ideas would be helpful.
>>
>Apprecia te your help,
>Stephen
>>
>
>




Aug 15 '06 #7
Well, you are using properties (which will be reset each time the page
loads) and ViewState (which will persist) when all you really need is
ViewState and forget the properties all-together. You are making your code
more difficult than it need be.

In the spots where you want to store data for the next page call, just put
that data directly into ViewState and forget the properties. When you need
the data, just pull it out of ViewState.

How about this:

Private Sub Page_Load( . . .) Handles MyBase.Load
If Not IsPostBack Then
setValues() --Setting basic values
SPOpType = Request.QuerySt ring("optype")
If Not SPOpType = "" Then
getDetails()
makeVisible() --Making Panels Visible
Else
makeInvisible() --Making Panels InVisible
End If
End If
End Sub

Private Sub btnGrid_Click( . . . ) Handles btnGrid.Click
Dim dsCompare As DataSet

'No need to cast thse text values since they will become objects in
ViewState anyway
ViewState.Add(" SPItemNumber", txtEVID.Text)
ViewState.Add(" SPSaleDate", txtSDate.Text)

Try
' DOES db.GetCompare() ON THE NEXT LINE RETURN A DATASET?
' If not, then dsCompare is not going to be instantiated as a
NEW dataset.
dsCompare = db.GetCompare(C Type(txtEVID.Te xt, Integer),
Ctype(txtSDate. Text, Date))

If Not dsCompare Is Nothing Then
ViewState.Add(" SPDGCompare", dsCompare)
dgCompare.DataS ource = dsCompare
dgCompare.DataB ind()
pnlCompare.Visi ble = True
End If
Catch ex As Exception
errLog.LogIt("B inding Compare Grid Error", ex, "")
End Try
End Sub

Private Sub getDetails()
Dim ds As DataSet
Dim dsSum As DataSet

Dim SPItemNumber As Integer = CType(ViewState ("SPItemNumber" ,
Integer))
Dim SPSaleDAte As Date = CType(ViewState ("SPSaleDate ", Date))

Try
dgCompare.DataS ource = CType(ViewState ("SPDGCompar e") , DataSet)
dgCompare.DataB ind()
Catch ex As Exception
errLog.LogIt("B inding Grid1 Error", ex, "")
End Try

ViewState.Add(" SPItemNumber", txtEVID.Text)
ViewState.Add(" SPSaleDate", txtSDate.Text)

Try
ds = db.GetDetails1( SPItemNumber, SPSaleDate, SAPOpType)
dgScroll.DataSo urce = ds
dgScroll.DataBi nd()
Catch ex As Exception
errLog.LogIt("B inding Grid2 Error", ex, "")
End Try

Try
dsSum = db.GetDetails2( SPItemNumber, SPSaleDate, SAPOpType)
dgSummary.DataS ource = dsSum
dgSummary.DataB ind()
Catch ex As Exception
errLog.LogIt("B inding Grid3 Error", ex, "")
End Try
End Sub

Aug 16 '06 #8
thanks Scott,
Will try this,
Stephen
"Scott M." <s-***@nospam.nosp amwrote in message
news:%2******** *******@TK2MSFT NGP03.phx.gbl.. .
Well, you are using properties (which will be reset each time the page
loads) and ViewState (which will persist) when all you really need is
ViewState and forget the properties all-together. You are making your
code more difficult than it need be.

In the spots where you want to store data for the next page call, just put
that data directly into ViewState and forget the properties. When you
need the data, just pull it out of ViewState.

How about this:

Private Sub Page_Load( . . .) Handles MyBase.Load
If Not IsPostBack Then
setValues() --Setting basic values
SPOpType = Request.QuerySt ring("optype")
If Not SPOpType = "" Then
getDetails()
makeVisible() --Making Panels Visible
Else
makeInvisible() --Making Panels InVisible
End If
End If
End Sub

Private Sub btnGrid_Click( . . . ) Handles btnGrid.Click
Dim dsCompare As DataSet

'No need to cast thse text values since they will become objects in
ViewState anyway
ViewState.Add(" SPItemNumber", txtEVID.Text)
ViewState.Add(" SPSaleDate", txtSDate.Text)

Try
' DOES db.GetCompare() ON THE NEXT LINE RETURN A DATASET?
' If not, then dsCompare is not going to be instantiated as a
NEW dataset.
dsCompare = db.GetCompare(C Type(txtEVID.Te xt, Integer),
Ctype(txtSDate. Text, Date))

If Not dsCompare Is Nothing Then
ViewState.Add(" SPDGCompare", dsCompare)
dgCompare.DataS ource = dsCompare
dgCompare.DataB ind()
pnlCompare.Visi ble = True
End If
Catch ex As Exception
errLog.LogIt("B inding Compare Grid Error", ex, "")
End Try
End Sub

Private Sub getDetails()
Dim ds As DataSet
Dim dsSum As DataSet

Dim SPItemNumber As Integer = CType(ViewState ("SPItemNumber" ,
Integer))
Dim SPSaleDAte As Date = CType(ViewState ("SPSaleDate ", Date))

Try
dgCompare.DataS ource = CType(ViewState ("SPDGCompar e") , DataSet)
dgCompare.DataB ind()
Catch ex As Exception
errLog.LogIt("B inding Grid1 Error", ex, "")
End Try

ViewState.Add(" SPItemNumber", txtEVID.Text)
ViewState.Add(" SPSaleDate", txtSDate.Text)

Try
ds = db.GetDetails1( SPItemNumber, SPSaleDate, SAPOpType)
dgScroll.DataSo urce = ds
dgScroll.DataBi nd()
Catch ex As Exception
errLog.LogIt("B inding Grid2 Error", ex, "")
End Try

Try
dsSum = db.GetDetails2( SPItemNumber, SPSaleDate, SAPOpType)
dgSummary.DataS ource = dsSum
dgSummary.DataB ind()
Catch ex As Exception
errLog.LogIt("B inding Grid3 Error", ex, "")
End Try
End Sub

Aug 16 '06 #9

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

Similar topics

2
13887
by: endus | last post by:
I'm having some trouble getting something to work. I'm not even sure whether or not this is possible, but it *seems* like it should be. I've done a fair amount of experimenting and googling...but maybe I'm still missing something obvious... I'm trying to have a <div> appear and disappear based on what a switchbox is set to. Having <div style="display: none;"> and then setting the display property to inline onChange works fine, but I...
3
9238
by: Mike Dole | last post by:
I experimented with a usercontrol (TagedTextbox), I added a tag property. The tag value however is not persisted on postback (text value's fine)? I worked around it with: Me.ViewState("tag") = txtToelichting.Tag but what's wrong with my code?
4
1802
by: Mark Broadbent | last post by:
This one has got me absolutely stumped. At work I have created a simple web form that gets data from a sql backend and puts this to a dataset. I have an edit button that when clicked will set the relevant text properties of several textboxes (to allow for edit) ....all simple so far. I have a save button that when clicked will then perform the writing back of the text in the textboxes. The problem is (and having debugged I see this)...
1
5697
by: Simon Wallis | last post by:
Hi, I have a PlaceHolder on a place, to which I add a DropDownList (using myPlaceHolder.Controls.Add(ddl). The user selects something from the DropDownList and posts the page. Now I try to get the value of what the user selected but the PlaceHolder's Controls collection is empty. I've tried turning viewstate of the PlaceHolder on and off but it doesn't make a difference (and I think I should be able to leave it off). What could be...
5
1714
by: BLACKDOG157 | last post by:
I've made a form with a variable number of textboxes. The user fills them out, and then I need to pick up the values he has filled in. The number of textboxes vary depending on a value that the user filled in in another page. But suppose there were 3 values. In that case, I know the names of the fields, they are MyTextBox1 MyTextbox2 MyTextbox3
2
8141
by: Robert Fernandez | last post by:
I've got a gridview with BoundFields and TemplateFields and a linkbutton with a CommandName="Select". When I click on this linkbutton the TemplateField objects disappear on postback but the BoundFields still have their data. Also the SelectedIndexChanged event is never hit. Why is this happening? ----------------------------------- <asp:GridView ID="gvSearchResults" runat="server" AutoGenerateColumns="false"...
5
4455
by: Nathan Sokalski | last post by:
I have a custom control that I wrote (I inherit from System.Web.UI.WebControls.CompositeControl). I dynamically add this control to my Page, but I was told that dynamically added controls do not survive postback. This seems to be true. However, this seems to make dynamically adding controls rather pointless to me, since if you cannot retrieve the values of the controls when you perform a postback, why add the controls in the firstplace?...
15
7737
RMWChaos
by: RMWChaos | last post by:
As usual, an overly-long, overly-explanatory post. Better too much info than too little, right? A couple weeks ago, I asked for some assistance iterating through a JSON property list so that my code would either select the next value in the member list or the single value. The original post can be found here. This is the code gits helped me write: for (var i = 0; i < attribList.id.length; i++) { var attrib = {};
0
952
by: michavo2000 | last post by:
Ok, first of all, forgiveness for my English. I understand the sequence of events within a control. However, I have a problem when dynamically generates controles. The Control, loads a collection of items. For each item, there will be a control child. The collection within reside in a property. But what happens if the event "createchildcontrols" happening before my property can be loaded into the viewstate. "If there is no property,...
0
9682
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
10874
Oralloy
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...
0
10566
jinu1996
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...
1
10623
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,...
0
10271
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...
1
7806
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
5668
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...
0
5848
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3124
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.