Hi,
I have this sub in which I am trying to get a client name from a second
table based on a clientid value in my datalist. I am having problems
grabbing the clientid value out of my datalist and putting it into my
variable curClientID. How do you grab a value out of a datalist properly
please?
Thx,Lerp
Here's my sub:
'THIS SUB HANDLES GRABBING CLIENT NAMES
Sub dlBookings_OnIt emDataBound(sen der As Object, e As DataListItemEve ntArgs)
If e.Item.ItemType = ListItemType.It em Or e.Item.ItemType =
ListItemType.Al ternatingItem Then
' Retrieve the Label control in the current DataListItem.
Dim ClientNameLabel As Label =
e.Item.FindCont rol("clientname label")
'Trying to grab clientid here
*************** *************** **************
Dim curClientID
curClientID = e.item.FindCont rol("clientid") ....
*************** *************** **************
' GRAB client name using ID from db here
Dim clientlabel As String
Dim strSQL as String
'SQL STATEMENT
strSQL = "SELECT fullname FROM CLIENT WHERE clientid=" & curClientID
'NEW CONNECTION OBJECT
Dim MyConn as New
SQLConnection(C onfigurationSet tings.AppSettin gs("dbConn"))
'NEW DATAREADER
Dim objDR as SQLDataReader
'NEW COMMAND OBJECT
Dim Cmd as New SQLCommand(strS QL, MyConn)
'OPEN CONNECTION
MyConn.Open()
'EXECUTE QUERY AND RETRIEVE DATA INTO READER
objDR = Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n)
WHILE objDR.Read
clientlabel = objDR("fullname ")
END While
myConn.close
'redisplay it in the DataList.
clientnamelabel .Text = clientlabel
End If
End Sub 4 1178
"Lerp" <ad***@officien ce.ca> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi,
I have this sub in which I am trying to get a client name from a second table based on a clientid value in my datalist. I am having problems grabbing the clientid value out of my datalist and putting it into my variable curClientID. How do you grab a value out of a datalist properly please?
Thx,Lerp Here's my sub: 'THIS SUB HANDLES GRABBING CLIENT NAMES Sub dlBookings_OnIt emDataBound(sen der As Object, e As
DataListItemEve ntArgs) If e.Item.ItemType = ListItemType.It em Or e.Item.ItemType = ListItemType.Al ternatingItem Then
' Retrieve the Label control in the current DataListItem. Dim ClientNameLabel As Label = e.Item.FindCont rol("clientname label")
'Trying to grab clientid here
*************** *************** ************** Dim curClientID curClientID = e.item.FindCont rol("clientid") ....
*************** *************** **************
' GRAB client name using ID from db here Dim clientlabel As String Dim strSQL as String
'SQL STATEMENT strSQL = "SELECT fullname FROM CLIENT WHERE clientid=" & curClientID 'NEW CONNECTION OBJECT Dim MyConn as New SQLConnection(C onfigurationSet tings.AppSettin gs("dbConn"))
'NEW DATAREADER Dim objDR as SQLDataReader
'NEW COMMAND OBJECT Dim Cmd as New SQLCommand(strS QL, MyConn)
'OPEN CONNECTION MyConn.Open()
'EXECUTE QUERY AND RETRIEVE DATA INTO READER objDR = Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n)
WHILE objDR.Read clientlabel = objDR("fullname ") END While
myConn.close
'redisplay it in the DataList. clientnamelabel .Text = clientlabel
End If End Sub
If the curClientID is a label, can't you just get the .text of it? You only
told it to find the control. You did not access any of the properties
associated with it (unless there is something after the elipsis ...).
---
Checked by AVG anti-virus system ( http://www.grisoft.com).
Version: 6.0.677 / Virus Database: 439 - Release Date: 5/4/2004
Hi jm,
I am trying to display the client name on the label in the itemtemplate, but
first I have to read the clientid from the fourth field of the current row
being displayed, do a query based on that clientid, and assign the
clientname value to the label within the datalist loop. My problem is that
I am unsure how to grab the value for the fourth column of the current row
of the datalist loop. there is nothing after the elipsis. I am unsure what
to write in order to grab that column value. I am coming from asp
background into .net.
Cheers, Lerp
"jm" <jo************ *@yahoo.com> wrote in message
news:BPanc.6774 $z06.1276684@at tbi_s01... "Lerp" <ad***@officien ce.ca> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi,
I have this sub in which I am trying to get a client name from a second table based on a clientid value in my datalist. I am having problems grabbing the clientid value out of my datalist and putting it into my variable curClientID. How do you grab a value out of a datalist
properly please?
Thx,Lerp Here's my sub: 'THIS SUB HANDLES GRABBING CLIENT NAMES Sub dlBookings_OnIt emDataBound(sen der As Object, e As DataListItemEve ntArgs) If e.Item.ItemType = ListItemType.It em Or e.Item.ItemType = ListItemType.Al ternatingItem Then
' Retrieve the Label control in the current DataListItem. Dim ClientNameLabel As Label = e.Item.FindCont rol("clientname label")
'Trying to grab clientid here
*************** *************** ************** Dim curClientID curClientID = e.item.FindCont rol("clientid") ....
*************** *************** **************
' GRAB client name using ID from db here Dim clientlabel As String Dim strSQL as String
'SQL STATEMENT strSQL = "SELECT fullname FROM CLIENT WHERE clientid=" & curClientID 'NEW CONNECTION OBJECT Dim MyConn as New SQLConnection(C onfigurationSet tings.AppSettin gs("dbConn"))
'NEW DATAREADER Dim objDR as SQLDataReader
'NEW COMMAND OBJECT Dim Cmd as New SQLCommand(strS QL, MyConn)
'OPEN CONNECTION MyConn.Open()
'EXECUTE QUERY AND RETRIEVE DATA INTO READER objDR =
Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n)
WHILE objDR.Read clientlabel = objDR("fullname ") END While
myConn.close
'redisplay it in the DataList. clientnamelabel .Text = clientlabel
End If End Sub
If the curClientID is a label, can't you just get the .text of it? You
only told it to find the control. You did not access any of the properties associated with it (unless there is something after the elipsis ...).
---
Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.677 / Virus Database: 439 - Release Date: 5/4/2004
"Lerp" <ad***@officien ce.ca> wrote in message
news:eQ******** ******@tk2msftn gp13.phx.gbl... Hi jm,
I am trying to display the client name on the label in the itemtemplate,
but first I have to read the clientid from the fourth field of the current row being displayed, do a query based on that clientid, and assign the clientname value to the label within the datalist loop. My problem is
that I am unsure how to grab the value for the fourth column of the current row of the datalist loop. there is nothing after the elipsis. I am unsure
what to write in order to grab that column value. I am coming from asp background into .net.
Cheers, Lerp
"jm" <jo************ *@yahoo.com> wrote in message news:BPanc.6774 $z06.1276684@at tbi_s01... "Lerp" <ad***@officien ce.ca> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi,
I have this sub in which I am trying to get a client name from a
second table based on a clientid value in my datalist. I am having problems grabbing the clientid value out of my datalist and putting it into my variable curClientID. How do you grab a value out of a datalist properly please?
Thx,Lerp Here's my sub: 'THIS SUB HANDLES GRABBING CLIENT NAMES Sub dlBookings_OnIt emDataBound(sen der As Object, e As DataListItemEve ntArgs) If e.Item.ItemType = ListItemType.It em Or e.Item.ItemType = ListItemType.Al ternatingItem Then
' Retrieve the Label control in the current DataListItem. Dim ClientNameLabel As Label = e.Item.FindCont rol("clientname label")
'Trying to grab clientid here
*************** *************** ************** Dim curClientID curClientID = e.item.FindCont rol("clientid") ....
*************** *************** **************
' GRAB client name using ID from db here Dim clientlabel As String Dim strSQL as String
'SQL STATEMENT strSQL = "SELECT fullname FROM CLIENT WHERE clientid=" &
curClientID 'NEW CONNECTION OBJECT Dim MyConn as New SQLConnection(C onfigurationSet tings.AppSettin gs("dbConn"))
'NEW DATAREADER Dim objDR as SQLDataReader
'NEW COMMAND OBJECT Dim Cmd as New SQLCommand(strS QL, MyConn)
'OPEN CONNECTION MyConn.Open()
'EXECUTE QUERY AND RETRIEVE DATA INTO READER objDR = Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n)
WHILE objDR.Read clientlabel = objDR("fullname ") END While
myConn.close
'redisplay it in the DataList. clientnamelabel .Text = clientlabel
End If End Sub
If the curClientID is a label, can't you just get the .text of it? You only told it to find the control. You did not access any of the properties associated with it (unless there is something after the elipsis ...).
---
Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.677 / Virus Database: 439 - Release Date: 5/4/2004
Okay, first, just to let you know "ClientID" is a reserved word in .net for
getting the unique asp.net generated value for a given control; especially
useful in building javascript applications. It allows you to use the
objects on the client that asp.net generates a unique number for (like the
ctl1, etc. do a view source for an example.)
I believe you are using ClientID like OrderID and it looks like you want to
retrieve a value from a datalist that you generate (and is visible) and then
use that value for use in another query that those values are then sent to
the user.
Say you have a datagrid:
sub mysub(sender as Object, e as DataGridItemEve ntArgs)
CType(e.Items.C ells(0).Control s(0), Button).visible = false
so, in:
"Dim curClientID curClientID = e.item.FindCont rol("clientid") ...."
put:
Dim curClientID as String = e.Items.Cells(? ).Controls(?).l abel).text
to retrieve the value at that location. Use the type of control you have
and its associated methods and properties (like .text).
Look here for a great primer (I know you may not be using the datagrid, but
it will still help you.): http://aspnet.4guysfromrolla.com/art...71002-1.3.aspx
in here you will see an example close to what I have shown you. However,
you should go to the first part of the set of articles and start over: http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
However, it looks like to get your data for your first datalist that you are
sending to the client you have some SQL or data somewhere you are retrieving
to build the datalist in the first place. So, instead of printing out the
datalist first and then searching for the newly printed out value from your
new datalist, just get the value from the retrieved SQL results, save it a
variable and then use THAT value for your next query.
For example, assume that I just queried a database and retreived my results.
You could get a value at the proper point in your retrieval by:
dim curClientID as string =
datasource.tabl es(0).rows(0)(" client_id").toS tring()
Then, use curClientID below in your next set of code.
I hope I understood your problem and that this somehow helps you (also, you
may also wish to avoid top posting for reading clarity.)
For a view of what I was saying about ClientID, see: http://msdn.microsoft.com/library/de...entIDTopic.asp
"Lerp" <ad***@officien ce.ca> wrote in message
news:eQ******** ******@tk2msftn gp13.phx.gbl... Hi jm,
I am trying to display the client name on the label in the itemtemplate,
but first I have to read the clientid from the fourth field of the current row being displayed, do a query based on that clientid, and assign the clientname value to the label within the datalist loop. My problem is
that I am unsure how to grab the value for the fourth column of the current row of the datalist loop. there is nothing after the elipsis. I am unsure
what to write in order to grab that column value. I am coming from asp background into .net.
Cheers, Lerp
"jm" <jo************ *@yahoo.com> wrote in message news:BPanc.6774 $z06.1276684@at tbi_s01... "Lerp" <ad***@officien ce.ca> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. Hi,
I have this sub in which I am trying to get a client name from a
second table based on a clientid value in my datalist. I am having problems grabbing the clientid value out of my datalist and putting it into my variable curClientID. How do you grab a value out of a datalist
properly please?
Thx,Lerp Here's my sub: 'THIS SUB HANDLES GRABBING CLIENT NAMES Sub dlBookings_OnIt emDataBound(sen der As Object, e As DataListItemEve ntArgs) If e.Item.ItemType = ListItemType.It em Or e.Item.ItemType = ListItemType.Al ternatingItem Then
' Retrieve the Label control in the current DataListItem. Dim ClientNameLabel As Label = e.Item.FindCont rol("clientname label")
'Trying to grab clientid here
*************** *************** ************** Dim curClientID curClientID = e.item.FindCont rol("clientid") ....
*************** *************** **************
' GRAB client name using ID from db here Dim clientlabel As String Dim strSQL as String
'SQL STATEMENT strSQL = "SELECT fullname FROM CLIENT WHERE clientid=" &
curClientID 'NEW CONNECTION OBJECT Dim MyConn as New SQLConnection(C onfigurationSet tings.AppSettin gs("dbConn"))
'NEW DATAREADER Dim objDR as SQLDataReader
'NEW COMMAND OBJECT Dim Cmd as New SQLCommand(strS QL, MyConn)
'OPEN CONNECTION MyConn.Open()
'EXECUTE QUERY AND RETRIEVE DATA INTO READER objDR = Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n)
WHILE objDR.Read clientlabel = objDR("fullname ") END While
myConn.close
'redisplay it in the DataList. clientnamelabel .Text = clientlabel
End If End Sub
If the curClientID is a label, can't you just get the .text of it? You
only told it to find the control. You did not access any of the properties associated with it (unless there is something after the elipsis ...).
---
Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.677 / Virus Database: 439 - Release Date: 5/4/2004
Okay, first, just to let you know "ClientID" is a reserved word in .net for
getting the unique asp.net generated value for a given control; especially
useful in building javascript applications. It allows you to use the
objects on the client that asp.net generates a unique number for (like the
ctl1, etc. do a view source for an example.)
I believe you are using ClientID like OrderID and it looks like you want to
retrieve a value from a datalist that you generate (and is visible) and then
use that value for use in another query that those values are then sent to
the user.
Say you have a datagrid:
sub mysub(sender as Object, e as DataGridItemEve ntArgs)
CType(e.Items.C ells(0).Control s(0), Button).visible = false
so, in:
"Dim curClientID curClientID = e.item.FindCont rol("clientid") ...."
put:
Dim curClientID as String = e.Items.Cells(? ).Controls(?).l abel).text
to retrieve the value at that location. Use the type of control you have
and its associated methods and properties (like .text).
Look here for a great primer (I know you may not be using the datagrid, but
it will still help you.): http://aspnet.4guysfromrolla.com/art...71002-1.3.aspx
in here you will see an example close to what I have shown you. However,
you should go to the first part of the set of articles and start over: http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
However, it looks like to get your data for your first datalist that you are
sending to the client you have some SQL or data somewhere you are retrieving
to build the datalist in the first place. So, instead of printing out the
datalist first and then searching for the newly printed out value from your
new datalist, just get the value from the retrieved SQL results, save it a
variable and then use THAT value for your next query.
For example, assume that I just queried a database and retreived my results.
You could get a value at the proper point in your retrieval by:
dim curClientID as string =
datasource.tabl es(0).rows(0)(" client_id").toS tring()
Then, use curClientID below in your next set of code.
I hope I understood your problem and that this somehow helps you (also, you
may also wish to avoid top posting for reading clarity.)
For a view of what I was saying about ClientID, see: http://msdn.microsoft.com/library/de...entIDTopic.asp
Thank you jm, I managed to get the name to display properly based on most
of your suggestions. Thank you again.
Thx, Lerp
"jm" <jo************ *@yahoo.com> wrote in message
news:_%fnc.7930 $536.1607804@at tbi_s03... "Lerp" <ad***@officien ce.ca> wrote in message news:eQ******** ******@tk2msftn gp13.phx.gbl... Hi jm,
I am trying to display the client name on the label in the itemtemplate, but first I have to read the clientid from the fourth field of the current
row being displayed, do a query based on that clientid, and assign the clientname value to the label within the datalist loop. My problem is that I am unsure how to grab the value for the fourth column of the current
row of the datalist loop. there is nothing after the elipsis. I am unsure what to write in order to grab that column value. I am coming from asp background into .net.
Cheers, Lerp
"jm" <jo************ *@yahoo.com> wrote in message news:BPanc.6774 $z06.1276684@at tbi_s01... "Lerp" <ad***@officien ce.ca> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. > Hi, > > I have this sub in which I am trying to get a client name from a second > table based on a clientid value in my datalist. I am having
problems > grabbing the clientid value out of my datalist and putting it into
my > variable curClientID. How do you grab a value out of a datalist
properly > please? > > Thx,Lerp > Here's my sub: > > > > 'THIS SUB HANDLES GRABBING CLIENT NAMES > Sub dlBookings_OnIt emDataBound(sen der As Object, e As DataListItemEve ntArgs) > > If e.Item.ItemType = ListItemType.It em Or e.Item.ItemType = > ListItemType.Al ternatingItem Then > > ' Retrieve the Label control in the current DataListItem. > Dim ClientNameLabel As Label = > e.Item.FindCont rol("clientname label") > > > 'Trying to grab clientid here > > *************** *************** ************** > Dim curClientID > curClientID = e.item.FindCont rol("clientid") .... > > *************** *************** ************** > > > > > ' GRAB client name using ID from db here > Dim clientlabel As String > Dim strSQL as String > > > 'SQL STATEMENT > strSQL = "SELECT fullname FROM CLIENT WHERE clientid=" & curClientID > 'NEW CONNECTION OBJECT > Dim MyConn as New > SQLConnection(C onfigurationSet tings.AppSettin gs("dbConn")) > > 'NEW DATAREADER > Dim objDR as SQLDataReader > > 'NEW COMMAND OBJECT > Dim Cmd as New SQLCommand(strS QL, MyConn) > > 'OPEN CONNECTION > MyConn.Open() > > 'EXECUTE QUERY AND RETRIEVE DATA INTO READER > objDR = Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n) > > > WHILE objDR.Read > clientlabel = objDR("fullname ") > END While > > myConn.close > > 'redisplay it in the DataList. > clientnamelabel .Text = clientlabel > > End If > > > > End Sub
If the curClientID is a label, can't you just get the .text of it?
You only told it to find the control. You did not access any of the properties associated with it (unless there is something after the elipsis ...).
---
Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.677 / Virus Database: 439 - Release Date: 5/4/2004 Okay, first, just to let you know "ClientID" is a reserved word in .net
for getting the unique asp.net generated value for a given control; especially useful in building javascript applications. It allows you to use the objects on the client that asp.net generates a unique number for (like the ctl1, etc. do a view source for an example.)
I believe you are using ClientID like OrderID and it looks like you want
to retrieve a value from a datalist that you generate (and is visible) and
then use that value for use in another query that those values are then sent to the user.
Say you have a datagrid:
sub mysub(sender as Object, e as DataGridItemEve ntArgs)
CType(e.Items.C ells(0).Control s(0), Button).visible = false
so, in:
"Dim curClientID > > > curClientID = e.item.FindCont rol("clientid") ...." put:
Dim curClientID as String = e.Items.Cells(? ).Controls(?).l abel).text
to retrieve the value at that location. Use the type of control you have and its associated methods and properties (like .text).
Look here for a great primer (I know you may not be using the datagrid,
but it will still help you.):
http://aspnet.4guysfromrolla.com/art...71002-1.3.aspx
in here you will see an example close to what I have shown you. However, you should go to the first part of the set of articles and start over: http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
However, it looks like to get your data for your first datalist that you
are sending to the client you have some SQL or data somewhere you are
retrieving to build the datalist in the first place. So, instead of printing out the datalist first and then searching for the newly printed out value from
your new datalist, just get the value from the retrieved SQL results, save it a variable and then use THAT value for your next query.
For example, assume that I just queried a database and retreived my
results. You could get a value at the proper point in your retrieval by:
dim curClientID as string = datasource.tabl es(0).rows(0)(" client_id").toS tring()
Then, use curClientID below in your next set of code.
I hope I understood your problem and that this somehow helps you (also,
you may also wish to avoid top posting for reading clarity.)
For a view of what I was saying about ClientID, see: http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemWebU IControlClassCl ientIDTopic.asp "Lerp" <ad***@officien ce.ca> wrote in message news:eQ******** ******@tk2msftn gp13.phx.gbl... Hi jm,
I am trying to display the client name on the label in the itemtemplate, but first I have to read the clientid from the fourth field of the current
row being displayed, do a query based on that clientid, and assign the clientname value to the label within the datalist loop. My problem is that I am unsure how to grab the value for the fourth column of the current
row of the datalist loop. there is nothing after the elipsis. I am unsure what to write in order to grab that column value. I am coming from asp background into .net.
Cheers, Lerp
"jm" <jo************ *@yahoo.com> wrote in message news:BPanc.6774 $z06.1276684@at tbi_s01... "Lerp" <ad***@officien ce.ca> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. > Hi, > > I have this sub in which I am trying to get a client name from a second > table based on a clientid value in my datalist. I am having
problems > grabbing the clientid value out of my datalist and putting it into
my > variable curClientID. How do you grab a value out of a datalist properly > please? > > Thx,Lerp > Here's my sub: > > > > 'THIS SUB HANDLES GRABBING CLIENT NAMES > Sub dlBookings_OnIt emDataBound(sen der As Object, e As DataListItemEve ntArgs) > > If e.Item.ItemType = ListItemType.It em Or e.Item.ItemType = > ListItemType.Al ternatingItem Then > > ' Retrieve the Label control in the current DataListItem. > Dim ClientNameLabel As Label = > e.Item.FindCont rol("clientname label") > > > 'Trying to grab clientid here > > *************** *************** ************** > Dim curClientID > curClientID = e.item.FindCont rol("clientid") .... > > *************** *************** ************** > > > > > ' GRAB client name using ID from db here > Dim clientlabel As String > Dim strSQL as String > > > 'SQL STATEMENT > strSQL = "SELECT fullname FROM CLIENT WHERE clientid=" & curClientID > 'NEW CONNECTION OBJECT > Dim MyConn as New > SQLConnection(C onfigurationSet tings.AppSettin gs("dbConn")) > > 'NEW DATAREADER > Dim objDR as SQLDataReader > > 'NEW COMMAND OBJECT > Dim Cmd as New SQLCommand(strS QL, MyConn) > > 'OPEN CONNECTION > MyConn.Open() > > 'EXECUTE QUERY AND RETRIEVE DATA INTO READER > objDR = Cmd.ExecuteRead er(system.data. CommandBehavior .CloseConnectio n) > > > WHILE objDR.Read > clientlabel = objDR("fullname ") > END While > > myConn.close > > 'redisplay it in the DataList. > clientnamelabel .Text = clientlabel > > End If > > > > End Sub
If the curClientID is a label, can't you just get the .text of it?
You only told it to find the control. You did not access any of the properties associated with it (unless there is something after the elipsis ...).
---
Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.677 / Virus Database: 439 - Release Date: 5/4/2004 Okay, first, just to let you know "ClientID" is a reserved word in .net
for getting the unique asp.net generated value for a given control; especially useful in building javascript applications. It allows you to use the objects on the client that asp.net generates a unique number for (like the ctl1, etc. do a view source for an example.)
I believe you are using ClientID like OrderID and it looks like you want
to retrieve a value from a datalist that you generate (and is visible) and
then use that value for use in another query that those values are then sent to the user.
Say you have a datagrid:
sub mysub(sender as Object, e as DataGridItemEve ntArgs)
CType(e.Items.C ells(0).Control s(0), Button).visible = false
so, in:
"Dim curClientID > > > curClientID = e.item.FindCont rol("clientid") ...." put:
Dim curClientID as String = e.Items.Cells(? ).Controls(?).l abel).text
to retrieve the value at that location. Use the type of control you have and its associated methods and properties (like .text).
Look here for a great primer (I know you may not be using the datagrid,
but it will still help you.):
http://aspnet.4guysfromrolla.com/art...71002-1.3.aspx
in here you will see an example close to what I have shown you. However, you should go to the first part of the set of articles and start over: http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
However, it looks like to get your data for your first datalist that you
are sending to the client you have some SQL or data somewhere you are
retrieving to build the datalist in the first place. So, instead of printing out the datalist first and then searching for the newly printed out value from
your new datalist, just get the value from the retrieved SQL results, save it a variable and then use THAT value for your next query.
For example, assume that I just queried a database and retreived my
results. You could get a value at the proper point in your retrieval by:
dim curClientID as string = datasource.tabl es(0).rows(0)(" client_id").toS tring()
Then, use curClientID below in your next set of code.
I hope I understood your problem and that this somehow helps you (also,
you may also wish to avoid top posting for reading clarity.)
For a view of what I was saying about ClientID, see: http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemWebU IControlClassCl ientIDTopic.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: clequieu |
last post by:
I have created a form. Within the form is a button to close the window
on click and to validate as well. The close window works when it is a
stand alone, but it does not work when it is embedded with the other
code. Here is the code I am currently using:
<p><font face="Trebuchet MS">
<input type="submit" value="Send" name="B1"
onClick="Javascript:window.close()" "MM_validateForm('Manager
Name','','R','Managers...
|
by: Henro V |
last post by:
Private Sub Form_Current()
If Form.NewRecord = True Then
If DCount("Id", "Urenregistratie") = 4026 Then
MsgBox "Sorry, deze registratie gaat maar tot en met 31-12-2004",
vbOKOnly, "Toevoegen niet mogelijk"
DoCmd.Close
End If
End If
End Sub
|
by: AA |
last post by:
This is making me crazy!!
Please, if some body can help me.
I'm testing a ver simple socket client.
In my test I just open and close a connection (in a loop) to my local IIS
server (port 80)
using System.Net.Sockets;
|
by: Chien Lau |
last post by:
Hi,
At a certain point in my application, I have access to a Form object. I
want to close that form:
form.Close();
There are any number of reasons why this form might not close. A common
reason might be that the user answered "No" when the form's OnClosing()
override asked him "Are you sure you want to close this form?"
|
by: louise raisbeck |
last post by:
I have this scenario (simplified)
function addnewdata () {
check for partial match already in db for information entered by user
if (partialmatch succeeds) {
open new window aspx page (using javascript) with a datagrid of these
partial match records (by doing a sqlcommand using some query string values
taken from opener data entered)
***
}
| |
by: Nathan |
last post by:
I know this has been asked previously, but I've run into a situation where I
need to know the difference between close and dispose, and I can't get the
information I need from msdn help or previous posts.
I have a game form that has a timer, which runs as long as the game is being
played. When the timer reaches zero, the GameOver form is called. On the
game form is a Quit button, in whose click event I have only the command
"Me.Close"....
|
by: bevanward |
last post by:
Hi all
I have a large data set of points situated in 3d space. I have a simple
primary key and an x, y and z value.
What I would like is an efficient method for finding the group of
points within a threshold.
So far I have tested the following however it is very slow.
|
by: Jan Tovgaard |
last post by:
Hey everyone:)
We have a critical problem, which I can see that other people also has ran
into.
In Internet Explorer 7 it is no longer possible to do a window.close after
opening a window,
without getting a alert message that ask if u want to close the window.
This did NOT happen in Internet Explorer 6, Mozilla firefox or other
browsers.
|
by: Tony |
last post by:
I am continuing to develop an Access 2007 application which was
originally converted from Access 2003. In Access 2003 I was able to
disable the Access Close button in the top righthand corner of the
screen. I have been unable to find any way to disable this button in
Access 2007 and subsequently I have been forced to find ways to detect
and handle the situations after the Access Close button has been
clicked.
I have been largely...
|
by: Bassem |
last post by:
I'm working on simple chat program via serial port. It works fine, but i face this problem.
When i try to open the exe, UnauthorizedAccess exception occurs, i can't use COM1 becuase someone else has it. I checked it and found that another copy of the program still work (by task manager). That's mean closing the program will not close the serial port. I tried these :
Note: I read it using a separate thread.
1)override OnClose to, close the...
|
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...
| |
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: 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...
|
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: 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.
| |