1

I have application which support multilingual. Now I have price page which is geo sensitive so that it might be change over location. I am trying to make one template for Html content and changing value from it based on location specific Value. Change value will be append into original html response.

Can somebody help me for such or it is not possible ?

4

1 回答 1

1

为了能够访问后面代码(C#/VB.net 代码)中的 html 控件,您需要以下两个步骤:

1.runat=server添加到您的 html 控件定义 2.为 html 控件声明一个 id

看下面的例子:

资源

<input runat="server" id="Text1" type="text" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />

代码背后

protected void Button1_Click(object sender, EventArgs e)
{
    Text1.Value = "Mahdi";
}

Text1是一个html控件并且Button1是一个服务器控件,当你点击Button1html文本控件的值会变成“Mahdi”。

于 2013-01-28T07:39:29.143 回答