I understand that you can access the server-side HTML control (which has "runat=server") from code behind in C# with FindControl. But my HTML table is a dynamic table, so I can't use it server-sided. How can I get the Rows.Count of this HTML table without "runat=server"? many thanks. UPDATE: After look around, I've encounter some solutions involving postback after assign the value to a hidden field. The point is, the hidden field must be in a physical and seperate html form, while I'm developing a DotNetNuke module control on a ascx file, which inherited the module form. If I add another form, it will says that I can't have 2 forms with runat=server. Still looking for a solution here.
How to access HTML control in C# code behind without "runat=server"?
3k views Asked by Harry At
3
There are 3 answers
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in CONTROLS
- How to control the volume of an iPhone programmatically in objective-c
- Accurately placing multiple controls in a row programmatically with dynamic table layout panel
- How to change the rule set in the qcc R package for Control Charts / Statistical Process Control
- C# Winform Change the type of row for data grid view
- How to use Complex conjugate in GEKKO
- Logging to a dynamically created WinForms control using the configuration file with log4net
- rlocus block diagram issue, k gain block before or after the summing junction for rlocus() command?
- What's git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin master:master
- C# UWP MediaPlayerElement customize TransportControls CCSelection with Choose Subtitle
- 'AutoSize=true' panel height not adjusting when labels become multiline
- .NET Maui What is wrong with this custom control's bindable properties?
- HTB overlimits traffic BW
- How can i get rid of the error = " Control must be added to the page first." on flet python
- Get all elements of a group property in Gambas
- Unity Scene view unable to pan
Related Questions in DOTNETNUKE
- Low Precision and Recall in LSTM Anomaly Detection Model
- Totally lost with Mobius Forms v5 on DNN
- Linq with strong typed data in 2sxc
- SearchBoost UrlFriendly Unwelcome Display
- Oqtane and Blazor-CMS on Windows using a remote PostgreSQL DB
- RequestVerificationToken not present when trying to export an app
- DotNetNuke Journal Module - User Profile Layout Discrepancy Between English and Italian Versions
- Can I get List Sort Options on a 2sxc App?
- 2sxc v14 to v16 Upgrade Issue: "Error trying to run ZoneIdOfApp(-100) - probably something wrong with the appId"
- How to visualize Deep learning framework using Keras package with R?
- Contenttype in 2sxc gives: The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'
- Using 2SXC behind a reverse prox
- Multiple DNN 9.11.0 sites on server all generating "unexpected error occurred on a send" General Exceptions
- Detect if 2sxc Module is the Original or from IRenderService
- DNN 9.13.01 on Windows Server 2019 throws null reference exception when installing extension
Related Questions in RUNATSERVER
- How to configure Nats supercluster to publish messages across two super-clusters running with different operators via gateways
- NATS custom metrics
- Nats memory usage is high how to limit it?
- Toastr notifications after ImageButton is Clicked C# aspx
- Nats client connection error with web sockets
- NATS with moleculer. How can I change NATS max_payload value?
- I can only use asp.Net to put 3 side buttons on my project
- run external exe file from dotnet core console application
- The mentioned HTML and JS code working in chrome but not in IE
- Control 'windowMasterSearchBox' of type 'TextBox' must be placed inside a form tag with runat=server
- javascript runat server arrow functions not working
- getting error 'must be placed inside a form tag with runat=server', but it is
- Why does jQuery autocomplete input break with runat?
- Apply tabindex attribute to asp:Menu control to gain focus
- Server Tags with HTML and Code Blocks inside
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can access an HTML control from code behind if it's server side, i.e. if it has the
runat="server"attribute.If your table is filled by some javascript code, you could save the rows number in a form field before the postback.