By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,292 Members | 1,596 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,292 IT Pros & Developers. It's quick & easy.

datagrid to generate additional querystring collection item to pull off on the target page for input into a condition statement test variable...??

P: n/a
I am trying to figure out how to add an additional value to a querystring
collection so that when I click on a datagrid cell, there will be a key to
distinguish it from another column's functionality. I have Edit and Delete
columns that each contain the ColumnID for the record I want to either edit,
or delete. When I pull the item of the collection on the target page's
page_load event, I will be able to either invoke a delete or an edit method
based on the info passed into the page.

The databinding code on the source page containing the grid is;
************************************************** *********************
hl.Text = "Edit"
hl.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hl.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hl)

hDelete.Text = "Delete"
hDelete.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hDelete.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hDelete)
grdlst.Columns.
************************************************** *********************

The code on the target page Page Load event is;
************************************************** ***
Dim coll As System.Collections.Specialized.NameValueCollection
coll=Request.QueryString

if coll.Count > 0 and Not Ispostback then 'Is a value passed in from
datagrid and not a post back?
str_LLCLientID = coll.Get(coll.Keys(0).ToString).ToString
DatabaseFetchDataForEditPage()
b_EditPage = True
************************************************** ************

I would like to be able to pull off of the collection an additional value
that is generated from the grid which will allow me to distinguish between
Edit and Delete functionality. I would like not to have to use a Session
Variable.

Thank you,
-Hazz (or does not hazz) the software solution
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Oh so simple it even hurts Bill. But it feels so good to have a solution
!!!!

And on the receiving end, there is;
str_querytype = coll.Get(coll.Keys(0).ToString).ToString

str_LLClientID = coll.Get(coll.Keys(1).ToString).ToString

Thank you !!!!!!

Greg Hazzard

"Bill Borg" <an*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
How about another parameter in each querystring, e.g.

"wfrmClientData_theme.aspx?Type=Edit&LLCLientID={0 }"
"wfrmClientData_theme.aspx?Type=Delete&LLCLientID= {0}"

...then parse out the type in your target page.

Bill

----- Hazzard wrote: -----

I am trying to figure out how to add an additional value to a querystring collection so that when I click on a datagrid cell, there will be a key to distinguish it from another column's functionality. I have Edit and Delete columns that each contain the ColumnID for the record I want to either edit, or delete. When I pull the item of the collection on the target page's page_load event, I will be able to either invoke a delete or an edit method based on the info passed into the page.

The databinding code on the source page containing the grid is;
************************************************** ********************* hl.Text = "Edit"
hl.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hl.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hl)

hDelete.Text = "Delete"
hDelete.DataNavigateUrlFormatString =
"wfrmClientData_theme.aspx?LLCLientID={0}"
hDelete.DataNavigateUrlField = "intUniqueClientNum"
grdlst.Columns.Add(hDelete)
grdlst.Columns.
************************************************** *********************
The code on the target page Page Load event is;
************************************************** ***
Dim coll As System.Collections.Specialized.NameValueCollection
coll=Request.QueryString

if coll.Count > 0 and Not Ispostback then 'Is a value passed in from datagrid and not a post back?
str_LLCLientID = coll.Get(coll.Keys(0).ToString).ToString
DatabaseFetchDataForEditPage()
b_EditPage = True
************************************************** ************

I would like to be able to pull off of the collection an additional value that is generated from the grid which will allow me to distinguish between Edit and Delete functionality. I would like not to have to use a Session Variable.

Thank you,
-Hazz (or does not hazz) the software solution

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.