使用C#访问textarea [英] Access textarea using C#

查看:298
本文介绍了使用C#访问textarea的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

有谁知道如何在asp.net中使用C#访问html textarea控件

我可以使用 runat ="server" 标签进行访问.

但是我需要不带runat ="server"即可访问此.并设置值.


请指导我,我在互联网上检查了很多...

有一种使用Request.Form ["txt"]的方法,但是我无法为此设置值.



谢谢

Hi..

Does anyone know how to access html textarea control using c# in asp.net

I can access using runat="server" tag.

But I have a requirement to access this without runat="server". and set the value.


Please guide me I checked lot on internet...

There is a way using Request.Form["txt"] but I am not able to set the value to this.



Thanks

推荐答案

如果您不想将html控件转换为html服务器控件,则无法通过c#代码访问它,但是可以通过javascript访问它. br/> 首先编写javascript函数,然后使用C#编码在页面后面的代码中调用此javascript函数.

祝你好运.
if you dont want to make your html control to html server control then you can not access it by c# code, but you can access it by javascript.
first write javascript function and then call this javascript function in codebehind page with C# coding.

good luck.


这篇关于使用C#访问textarea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆