473,387 Members | 1,512 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,387 software developers and data experts.

to get hidden field value onrowcommand

1
Expand|Select|Wrap|Line Numbers
  1. protected void ItemCategoryListView_RowCommand(object source, GridViewCommandEventArgs e)
  2.         {
  3.  
  4.  
  5.             if (e.CommandName == "EDITITEM")
  6.             {
  7.  
  8.                 btnSave.Visible = false;
  9.                 btnUpdate.Visible = true;
  10.                 GridViewRow row = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
  11.  
  12.                 int RowIndex = row.RowIndex;
  13.  
  14.                 string hd = (row.FindControl("HiddenField1") as HiddenField).Value; 
  15.                     if (hd == "1")
  16.                     {
  17.                         ddlLevel.Enabled = false;
  18.                         ddlItemTypeMaster.Enabled = false;
  19.                         ddlItemParentCategoryName.Enabled = false;
  20.                     }
  21.                }}
Aug 28 '18 #1
1 3018
zmbd
5,501 Expert Mod 4TB
devisr:
Are you asking a question or just posting code?
If you have a question then you need to actually ask it within the post and provide a bit of explanation. If you are merely posting code, there are other sites which specialize in cataloging and posting code snippets wherein your code would have a better life :)
Aug 29 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rauf ul Hassan | last post by:
I submit a form with a submit button and method of form is Post. When I use request.getParameter() in the next page to get the value of a hidden field, I get a NULL value. However when I use Get...
2
by: Patrick | last post by:
I currently us JavaScript to populate a hidden field with my scroll location in order to retain the page location when I post the page back to itself. However, I don't know how to pass that hidden...
1
by: Jim | last post by:
I have a 2 checkboxes and a hidden field..what I want to happen is that you can only click on 1 of these checkboxes at a time and when you check a checkbox it will assign the hidden field...
4
by: GavMc | last post by:
Hello I am new to internet programming and wonder if anyone can help me with this.... I am trying to pass a hidden field value on a form into another field on the form so that it can then be...
2
by: Rodusa | last post by:
I have a hidden field inside one datagrid which I can't get to make it keep its state after a postback event. Look field: <input type="hidden" id="TxtHiddenItem_id" name="TxtHiddenItem_id"...
4
by: PJ6 | last post by:
From a control's onkeypress the below javascript snippet is executed. I am attmpting to set the value of a hidden field... I believe I'd be able to get the contents of the hidden field by using...
1
by: fatima.issawi | last post by:
Hello, I am trying to set the value of a hidden field in Javacript in my UserControl. I need to access the value in the code-behind. For some reason, the value of the hidden field never gets...
14
Frinavale
by: Frinavale | last post by:
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one. I have a...
2
by: MOzgaf | last post by:
Hi, The problem is I have a list that i want to send to other file(php) but I want to send two corresponding variables. I was wondering if this is easy with the hidden field. <select...
1
by: iqbal1486 | last post by:
I have this field. <input type="hidden" name="hiddenfield" value="example"> NO FORM TAG,NEITHER METHOD i want to get the value from the filed without using the form tag and methods. is it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
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,...

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.