Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7761001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:02:29+00:00 2026-06-01T14:02:29+00:00

I have the following code : <html xmlns=http://www.w3.org/1999/xhtml> <body style=height: 1336px> <input type=hidden id=loadingtime/>

  • 0

I have the following code :

<html xmlns="http://www.w3.org/1999/xhtml">

<body style="height: 1336px">
<input type="hidden" id="loadingtime"/>
.
.
.
.
</body>
</html>

and the Code.cs file is :

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string s = "";
        HiddenField t = (HiddenField)Page.FindControl("loadingtime");
        s = t.Value;
        Response.Write("<script language='javascript'>alert('It took : " + s + "')</script>");
    }
}

I get error
Any idea?

EDIT :
The above problem is successfully solved by
Now when I retrieve the value of loading time, the value is empty string. Can anyone please solve this one?
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:02:30+00:00Added an answer on June 1, 2026 at 2:02 pm

    Your input should have runat=”server” enabling it to be parsed by the ASP.NET runtime i.e.

    <input type="hidden" runat="server" id="loadingtime"/>
    

    You can then refer to the control as you would normally in code behind using:

    HiddenField t = (HiddenField)loadingtime;
    

    AS LONG AS it is not wrapped in another server control such as an asp:repeater in which case you would need to use alternative method of traversing the control hierarchy

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title></title> <script src=http://code.jquery.com/jquery-1.4.4.min.js></script> <script type=text/javascript
I have the following code: <html xmlns=http://www.w3.org/1999/xhtml xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd xml:lang=en lang=en> <body> <wicket:panel> <div wicket:id=serviceListContainer>
I have the following code: <html xmlns=http://www.w3.org/1999/xhtml lang=en xml:lang=en> <head> <title>Image uploader</title> </head> <body>
I have a WordPress template that contains the following element: <html xmlns=http://www.w3.org/1999/xhtml <?php language_attributes('xhtml');
I have the following simple code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
I have the following code. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> <html
I have the following code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html
hi i have following code <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html
<!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 dir=ltr> <head> <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js
I have the following code: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd> <html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.