473,769 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page.RegisterHi ddenField does not work!

Are there any known restrictions on where Page.RegisterHi ddenField will work? It seems to only work in the Page_Load event...My code below fails to render it in the page's source

I would like these values to be used by some client-side javascript. If I can't use the register methods here, how can I make the data grid's clicked values availble in the Page_Load's Postback? Thanks, Dave

private void dgGrid_ItemComm and(Object src, DataGridCommand EventArgs e

if (e.Item.ItemInd ex >= 0)

//--Get the posted values from the datagrid..
dgPortfolio.Sel ectedIndex = e.Item.ItemInde x
string sId= dgGrid.DataKeys[e.Item.ItemInde x].ToString()
string sName= dgGrid.Selected Item.Cells[2].Text
Page.RegisterHi ddenField("Id", sId)
Page.RegisterHi ddenField("Name ", sName)
}
Nov 18 '05 #1
0 2699

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
43616
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head>
1
2525
by: MeDhanush | last post by:
Can sb pl tell me When & how do you use i) RegisterHiddenField() ii) Hidden field EVENTTARGET iii) Hidden fieldEVENTARGUMENT I noticed ii) and iii) in the form. Any docs pointing to this info
0
1897
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I have run into is that the emitted html at the end of the process is slightly different and doesn't work. Please don't be put off by all the source code. All the guts are in this first base class, and it doesn't do much. The rest is trivial...
1
311
by: Devin | last post by:
I am creating a form, and when a user clicks on the ASP.NET calendar control, or on another checkbox that sends a request to the server, the page reloads fine, except that it is at the top of the page, instead of where it was originally. Is there an easy way to move the page back to the current position? or does it have to be individually coded. If individually coded, how might that look? thank Devin
4
3627
by: Magnus Blomberg | last post by:
Hello! I have a problem when using a hidden field to send a value to the server. Below you can see my code in simplyfied versions. What I'm trying to do is: 1. The user browses for a picture at the network from their computer using control File1. 2. The user clickes the button Commit picture (with id CliBtn) a. The script is running at the client to get the sharename of the file
1
2096
by: jmgro | last post by:
I have spent way too much time trying to solve the following problem: I have a datalist with a timer in the footer template. It works wonderfully except when the user pages back, then forward, and the counter is reset. I saw in one of Kevin Spencer's comments not to put the timer in javascript on the load function, but I have to get the script to run before the page is rendered, otherwise my timer is not displayed. I have a flag "Hidden...
6
4901
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
1
1501
by: Fabuloussites | last post by:
I have a master page that has a button on it that is included on all of it's child pages. On one of the chile pages, there is a login control. I would like to have the login control become the default button when that page is in use. Currently, if a user tries to log in, when they press the enter key, the forms defaults to the actions of the button on the master page. Any suggestios on how to fix this? I converted the login control to...
2
9836
by: AlecL | last post by:
Hi All, I have added a user control onto an aspx page and want to make the submit button of that user control the default button when the panel in which the user control is located is visible. I have used the code: Page.RegisterHiddenField("__EVENTTARGET", "Login.btnSubmit") in the Page Load event but this does not make the submit button default(enter) button. Any ideas on how can I do this. I have also tried using just the name of...
0
9590
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.