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

How to access HTML content in code behind

I have textarea and link on my code aspx page. How can i access these values on my code aspx.cs page?
Note: I do not want to use runat=server tag for my table.
Sep 16 '10 #1
3 1433
Frinavale
9,735 Expert Mod 8TB
Well, you have to have runat="server" in your TextArea and your Link if you want to access them in your server code like any other ASP.NET control. You could use the Request object to retrieve the TextArea by ID from the Request.Params property.

It's best if you posted your code so that we can help you further.

-Frinny
Sep 16 '10 #2
If you do not want to use runat=server you can only really read what the client posts back to use and cannot manipulate the element from your server code (besides some render tags in the markup or something) Make sure the element is nested inside the form element, give it an id, and you should be able access the client posts to you via HttpRequest.Form collection via the id you specified.
Sep 22 '10 #3
yes thanks. I used request.form to get textarea
Sep 22 '10 #4

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

Similar topics

2
by: Greg Linwood | last post by:
How does one access HTML elements from code-behind? I've got a mix of asp:Labels & <font> elements - I'd like to continue using <font> elements, but be able to access them from code-behind to set...
2
by: Technical Support | last post by:
Good afternoon, I created a custom control, compiled it into a DLL, and added it to the BIN directory. I placed an instance of the control in a webForm and am trying to programatically change its...
5
by: VB Programmer | last post by:
Here's the quick situation: 1. Using VS.NET I create 1 fully functioning aspx page, with code behind. (Simple webform: It has a few text boxes, 1 hyperlink, 2 and buttons.) 2. I uploaded it to...
1
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following HTML code and I like to change the value of REFRESH content from 2 to something else at runtime. Any suggestions? <HTML> <HEAD> <meta name="GENERATOR"...
4
by: philippe merrien | last post by:
hello, I would like to modify the content of my html page from the code behind. But i've got a problem...I know how to get the html from a spécific control (thanks to FindControl) but what...
3
by: Pierre | last post by:
Hello, I always get a nothing object when retrieving a table tag in the aspx page. I wonder why this piece of code doesn't work : the mytable object is still nothing. Here is the code : In...
2
by: Michael Raczynski | last post by:
Hey guys, Apologies if this is in the wrong thread, whenever I search for <% or "switching context" I get no results. What I am trying to do is set the value of a html text box to a server...
3
by: David A. Osborn | last post by:
I have a web project inVS2005 that I copied some existing pages from a website that I previously created. To clarify the website was originally created in Visual Web Developer Express and not I...
1
by: BlueJumper.com | last post by:
Does anyone know how to access a users Profile from the code behind. When using code in-front I can simple Type Profile.Blah but this isn't available in Code Behind Cheers Fran
3
by: markpringle | last post by:
This is my sqldatasource this is on the page: <asp:sqldatasource runat="server" ID="DS_CheckUserName" ConnectionString="<%$ ConnectionStrings:SQL2005_355184_ConnectionString %>" ...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.