hiddenfield

HiddenField Value Lost on Postback

本秂侑毒 提交于 2019-12-22 00:13:26
问题 I have some JavaScript that sets the value of a HiddenField and then forces a postback. I can trace through this JavaScript and it appears to work correctly. However, when I test the value of the HiddenField from the page's Load event, it is no longer set. Searching the web, I see a lot of posts about losing HiddenField values but none of them seemed to be doing the same thing that I am. Here's my JavaScript function (modified): function EditItemItem(itemId) { document.getElementById('<%=

ASP.net sensitive information storage

狂风中的少年 提交于 2019-12-18 07:09:14
问题 I'm having a small trouble with ASP.net. I have a small DataTable that i need to be page dependent and also user inaccessible. What i mean is: If i store the data from the DataTable inside a Hiddenfield, the hiddenfield is page dependent (different values for multiple same page requests) but its not user inaccessible since a user can modify its content and then post back. If i store the Datatable in session, that is user inaccessible (which is good) but since some of the content from the page

Get the Value of an asp:HiddenField using jQuery

∥☆過路亽.° 提交于 2019-12-18 03:04:09
问题 I have two pages. From the first page, I open a modal with a querystring that holds that value of a client name. I then use this to set a hiddenfield on the modal that opened. I need a TextBox on the new modal to display the value that has been sent through from the first screen. I've tried getting the value using: var hv = $('hidClientField').val();` But this doesn't seem to work. This is my hidden field: <asp:HiddenField ID="hidClientName" runat="server" />` I set it in the code behind on

How to access hidden_field in controller in Ruby on rails

♀尐吖头ヾ 提交于 2019-12-14 03:49:30
问题 Question: How to access hidden field value post_id from file view/comments/_comment.html.erb and use it in controllers/dashboards_controller.rb ? - there are 2 controllers - dashboard and comments, and using gem act_as_commentable_with_threading Now I get: ActiveRecord::RecordNotFound in DashboardsController#index Couldn't find Post without an ID config/routes.rb resources :comments, :only => [:create, :destroy] controllers/dashboards_controller.rb class DashboardsController <

HiddenField Value Lost on Postback

只愿长相守 提交于 2019-12-04 19:29:34
I have some JavaScript that sets the value of a HiddenField and then forces a postback. I can trace through this JavaScript and it appears to work correctly. However, when I test the value of the HiddenField from the page's Load event, it is no longer set. Searching the web, I see a lot of posts about losing HiddenField values but none of them seemed to be doing the same thing that I am. Here's my JavaScript function (modified): function EditItemItem(itemId) { document.getElementById('<%= EditItemId.ClientID %>').value = itemId; __doPostBack('<%= EditItemUpdatePanel.ClientID %>', ''); } And

Selenium WebDriver - get options from hidden select

落花浮王杯 提交于 2019-12-01 10:39:08
I want to get all the options from a hidden select. Select has "display: none;" part so I ran into a problem. <select name="fw3k_ad_input_et_type_group" class="" id="_id_fw3k_ad_input_et_type_group" onchange=" eurotax.change_type_group( this.value ); " style="display: none; "> <option value="0">1</option> <option value="-1" class="special">2</option> <option value="16390">CD</option> <option value="17605">S</option> <option value="17636">SE</option> </select> My code: Select tipSelect = new Select(driver.findElement(By.name("fw3k_ad_input_et_type_group"))); for (WebElement b : tipSelect

Selenium WebDriver - get options from hidden select

China☆狼群 提交于 2019-12-01 06:37:40
问题 I want to get all the options from a hidden select. Select has "display: none;" part so I ran into a problem. <select name="fw3k_ad_input_et_type_group" class="" id="_id_fw3k_ad_input_et_type_group" onchange=" eurotax.change_type_group( this.value ); " style="display: none; "> <option value="0">1</option> <option value="-1" class="special">2</option> <option value="16390">CD</option> <option value="17605">S</option> <option value="17636">SE</option> </select> My code: Select tipSelect = new

ASP.net sensitive information storage

让人想犯罪 __ 提交于 2019-11-29 11:57:15
I'm having a small trouble with ASP.net. I have a small DataTable that i need to be page dependent and also user inaccessible. What i mean is: If i store the data from the DataTable inside a Hiddenfield, the hiddenfield is page dependent (different values for multiple same page requests) but its not user inaccessible since a user can modify its content and then post back. If i store the Datatable in session, that is user inaccessible (which is good) but since some of the content from the page depends on this value, if a user opens the page multiple times (in different tabs) then the session is

Get the Value of an asp:HiddenField using jQuery

断了今生、忘了曾经 提交于 2019-11-29 01:06:05
I have two pages. From the first page, I open a modal with a querystring that holds that value of a client name. I then use this to set a hiddenfield on the modal that opened. I need a TextBox on the new modal to display the value that has been sent through from the first screen. I've tried getting the value using: var hv = $('hidClientField').val();` But this doesn't seem to work. This is my hidden field: <asp:HiddenField ID="hidClientName" runat="server" />` I set it in the code behind on the Page_Load like this: hidClientName.Value = Request.QueryString["Client_Name"] ?? "";` Any ideas will

IF Statement Always True

元气小坏坏 提交于 2019-11-26 21:02:33
I have a radwindow that I use to show error messages to users in an application. My goal is as below; If the message is not a warning/error I want user to be redirected when they click "OK" on the popped up radwindow. To accomplish this, I'm setting HiddenField value to "1" when the operation is successful and to "0" when the operation fails. My problem is that when I check the HiddenField value on the client-side the IF statement always returns true, and the page is redirected. Here are the cases when I set the hiddenfield value and set the radwindow message; if(x) { hfPasswordWarning.Value =