.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Hidden field and JS

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :ASP.Net
HiI have a HiddenField in one page. So now i want to use the same HiddenField value in another page in the JavaScript(second page JS)How should i get the value into another page.Thanks

View Complete Post

More Related Resource Links

Collect Feedback workflow hidden field


Hello all,

I am using the out of box Collect Feedback workflow.  It works well for most part.  However I would like to get reviewer's feedback to be shown on a Dashboard.  Is there a way to expose that information in a Data View?  I couldn't figure out which data field stores the feedback information.


Hidden field not available in XSL

Hi folks, I have a Custom List that uses a ContentType which defines a column as Hidden (will not appear in forms). When I create a DVWP, this column is not available - i.e. <xsl:value-of select"@MyColumn"/> gives a blank value. Changing the column to "Optional" fixes this problem, but then the field appears in the normal edit / display forms. The column's value is set programatically by a web-part. Is there a setting I have missed to allow a field to be viewed using a DVWP but not in the standard edit / display forms? or any other reason why the value would not be showing up in the DVWP when the column is set to Hidden?? Thanks, Alex

Custom field type - set value doesn't work when field is hidden

Hi, I have a simple custom field type which gets a value from the Property Bag and sets that value to a label. This works fine as long as the field is set to Optional (the field is a site column and is part of a site content type), but if I set it to Hidden, the value doesn't get set. public override void UpdateFieldValueInItem()         {             this.EnsureChildControls();               if (this.ControlMode == SPControlMode.New)             {                 this.Value = GetChosenConsole();             }         }   Does anyone know why this is and what I need to do in order for it to work even though it's hidden? Thanks!

Pass parameter to Hidden Field in SSRS Report

Hi, I have Two Columns in a Table Say As Table1 Column1 = Text Column2= id My SSrs Report has two parameter values as Column1 and Column2. Column2 should be hidden SELECT DISTINCT COlumn1 FROM Table1. i have passed this query dataset to Column1 parameter. Now My requirement is that, when ever column1 drop is selected. the hidden field column2 should fecth the corresponding ID. this column2 has Storeprocedure which will Display the Output when View Report button is clicked Thanks, Saraswathy

Passing hidden field ASP.net to javascript

Hi!   I have in my project an button that when is press need to verify if the aplication has been save. If the app no save, then popup a message (confirm box) to ask user yes or no to continue.   Hi have in my asp code a hidden field that gives me if the app is saved ou not, and I have this javascript function that I atach to my button onclientclick function.  <asp:HiddenField ID="HIdCab" runat="server" />    <asp:Button ID="BtnRetomar" runat="server" CausesValidation="False" CssClass="botao" Text="Retornar" Width="85px" onclientclick="" />   <script type="text/javascript" language="javascript">function MyRetornar(){    var myId = document.getElementById("<%=HIdCab.ClientID%>");                if (myId==null)    {               return confirm('Quer retornar SEM GRAVAR a aplicação actual?');   }    else    {        return true;     }}                   <

Javascript price update ...hidden field ... asap

Hello Experts http://store.apple.com/us/configure/MC374LL/A?mco=MTc0Njg1ODA Like in this link i created a javascript function  === id , lenght , width , dept , capacity ,price ..<script type="text/javascript">function getproductdetail (id,len,wid,dep,cap,thick,prc)     {          document.getElementById('row1')=prc   }          </script>the same function is called at a new place where i pass only price .. i have to check if there is a price is present in 'row1' i have to add new prc to present one .. =================== thing is where i will retain the old value present .. How to check whether value is prsent in row1 or not ..... if i will choose hidden field where to use and how to check value for that ... Thanks

Make a list field ediable by a group of users or hidden to everyone else.


I understand how to hide a field, but this hides it for everyone. My team want to hide it for the users and show it for our team. The field we want hidden from other users are Assigned to, Due Date, and Due Date, but we want our team to be able to edit these fields; not the other users. Is it any way to do this? Thanks for the help.



How do I posting session information to server through the hidden field ?


I have the following in my code (Login.aspx page)


 <script language="javascript" type="text/javascript">


Insert the date as a hidden field using details view


When adding a new record. I have a field that displays the current date using now(). I want to make that a hidden field and simply insert it into the database when the new record is submitted.

I tried making it a template field and then deleting the textbox and inserting a hidden field but I can only either bind it to the field in the database or use custom binding to add the date value 'now()'... I don't seam to be able to do both.

any ideas ?

What is the difference between view state and a hidden field


What is the difference between view state and a hidden field?

As we know that view state allows the the state of objects to be stored in hidden fields and is stored in client side. but what is the exact difffrence between a view state and a hidden field

Retrieve a hidden flag/field/ textbox/ variable from SSRS in C# with reportExecutionService



I want to set a HIDDEN flag in my reports (SSRS 2008) and retrieve in my C# code. If it's possible please share your suggestions.


Thank you,


calculation, field and map traverse adjustment, and coordinate transformation

Free Pocket PC land surveying software -- COGO calculation, field and map traverse adjustment, and coordinate transformation -- for students and professionals.

Dropdown Event (Template Field)



I have grid view control that includes a dropdown control in a template field.

I wish to execute some code when the value is changed in the dropdown list.  Can't figure out how to capture this event though?

Any suggestions?

How to take value of bound field of grid in a variable or in a textbox.


How to take value of bound field of grid in a variable or in a textbox.

 I m using this code in .aspx page for grid.

<asp:GridView ID="Grd_Mprocess" runat="server" AutoGenerateColumns="False"

                      Width="100%" AllowPaging="True"


                      AllowSorting="True" PageSize="5"  >

                 <RowStyle CssClass="odd" />


<asp:BoundField HeaderText="DOC_TYPE_PK" DataField="DOC_TYPE_PK"  Visible="true" >


  <asp:TemplateField HeaderText="DOC TYPE ID" Visible="true">  &nbs

Tab container rendered with visibility:hidden - This was reported over three years ago.



Here is (more) code that demonstrates the issue.  If the control in the host page is removed the tab control renders correctly.  Otherwise it is rendered with the visibility attrubute set to hidden as reported in the above link.  Is this broken or am I doing something wrong?



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="S2.aspx.cs" Inherits="S2" %>
<%@ Register Src="~/SelectorPatternControl.ascx" TagName="TestControl" TagPrefix="sam" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
        <cc1:ToolkitScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></cc1:ToolkitScriptManager>

Hidden variable has no value


I know I have a valid solution, but the js is telling me that the value in the hdnRecordSaved variable has no value!
Even when I specify in my function the following, it still tells me it has no value:
var myTextField = document.getElementById('hdnRecordSaved');

When I put the full value of the variable in (ctl00_ctl00_cphTopCenter_cphCenter_hdnRecordSaved.value), I get the correct contents back ("1"), which I set in my code behind. However, I would prefer to just put the short name in since the masterpages may change, etc. Unfortunately, I know I can get around this with VS2010, but we are using VS2008.

What am I doing wrong with the js naming conventions that can't give me the contents? Here is my below js.

<asp:Panel ID="pnlMapFields" runat="server" ScrollBars="Both" Height="430px">

<telerik:RadTreeView ID="RadTreeView1" runat="server" DataTextField="Description"

DataFieldParentID="MapFieldparentID" DataF

I need help about nvarchar field



how can specified nvarchar data type without N''?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend