相关代码 |
|
void Button_Click(Object sender , EventArgs e) { CompiledTemperatureService objTemp = new CompiledTemperatureService(); lblCelsius.Text = objTemp.ToCelsius(Double.Parse(txtFahrenheit.Text)).ToString("n"); } ConvertTemperature.aspx Fahrenheit: ID="txtFahrenheit" Runat="Server" /> Text="Convert!" OnClick="Button_Click" Runat="Server" /> ID="lblCelsius" Runat="Server" />
相关资源 |
|