Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to selected value of a dropbox column of a DataGridView programmatically? Pin
Richard MacCutchan13-Nov-20 2:16
mveRichard MacCutchan13-Nov-20 2:16 
GeneralRe: How to selected value of a dropbox column of a DataGridView programmatically? Pin
Alex Dunlop13-Nov-20 3:09
Alex Dunlop13-Nov-20 3:09 
AnswerRe: How to selected value of a dropbox column of a DataGridView programmatically? Pin
Gerry Schmitz13-Nov-20 4:10
mveGerry Schmitz13-Nov-20 4:10 
QuestionCommented code in c# forms does it affect the performance Pin
Sachin Kulkarni B12-Nov-20 4:50
Sachin Kulkarni B12-Nov-20 4:50 
AnswerRe: Commented code in c# forms does it affect the performance Pin
OriginalGriff12-Nov-20 5:08
mveOriginalGriff12-Nov-20 5:08 
GeneralRe: Commented code in c# forms does it affect the performance Pin
trønderen12-Nov-20 7:22
trønderen12-Nov-20 7:22 
AnswerRe: Commented code in c# forms does it affect the performance Pin
Gerry Schmitz13-Nov-20 3:58
mveGerry Schmitz13-Nov-20 3:58 
QuestionThe name does not exist in the current context Pin
darkdxd11-Nov-20 22:04
darkdxd11-Nov-20 22:04 
Greetings,

I'm new to C# and currently I'm trying to make 2 simple textboxes for weather, one to have the temperature in Celsius, and the other textbox have the temperature in Fahrenheit, what I wanna do is make the user type the temperature in any textbox and the other will calculate and convert it like from Celsius to Fahrenheit and vice versa,

but I keep getting errors:
"The name 'TXTF" does not exist in the current context"
"The name 'TXTC" does not exist in the current context"

here is my code:-

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MainWeb2
{
    public partial class Weather : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void TextBox1_TextChanged(object sender, EventArgs e)
        {
            String C = TextBox1.Text;
            int TXTC = Int32.Parse(C);
            string TXTC1 = TXTC.ToString();
            TXTC = (TXTF - 32) * (5 / 9);
        }

        protected void TextBox2_TextChanged(object sender, EventArgs e)
        {
            String F = TextBox2.Text;
            int TXTF = Int32.Parse(F);
            string TXTF1 = TXTF.ToString();
            TXTF = (TXTC) * (9 / 5) + 32;
        }
    }
}


What should I do?
AnswerRe: The name does not exist in the current context Pin
Richard Deeming11-Nov-20 23:01
mveRichard Deeming11-Nov-20 23:01 
AnswerRe: The name does not exist in the current context Pin
trønderen11-Nov-20 23:01
trønderen11-Nov-20 23:01 
AnswerRe: The name does not exist in the current context Pin
Richard MacCutchan11-Nov-20 23:03
mveRichard MacCutchan11-Nov-20 23:03 
AnswerRe: The name does not exist in the current context Pin
OriginalGriff11-Nov-20 23:06
mveOriginalGriff11-Nov-20 23:06 
QuestionHow to find days between a defined date and now? Pin
Alex Dunlop10-Nov-20 7:51
Alex Dunlop10-Nov-20 7:51 
AnswerRe: How to find days between a defined date and now? Pin
Richard MacCutchan10-Nov-20 8:56
mveRichard MacCutchan10-Nov-20 8:56 
GeneralRe: How to find days between a defined date and now? Pin
Alex Dunlop10-Nov-20 16:48
Alex Dunlop10-Nov-20 16:48 
GeneralRe: How to find days between a defined date and now? Pin
Richard MacCutchan10-Nov-20 21:57
mveRichard MacCutchan10-Nov-20 21:57 
AnswerRe: How to find days between a defined date and now? Pin
Gerry Schmitz10-Nov-20 14:51
mveGerry Schmitz10-Nov-20 14:51 
GeneralRe: How to find days between a defined date and now? Pin
Alex Dunlop10-Nov-20 16:57
Alex Dunlop10-Nov-20 16:57 
GeneralRe: How to find days between a defined date and now? Pin
Gerry Schmitz10-Nov-20 18:11
mveGerry Schmitz10-Nov-20 18:11 
AnswerRe: How to find days between a defined date and now? Pin
Mycroft Holmes11-Nov-20 11:12
professionalMycroft Holmes11-Nov-20 11:12 
QuestionJSON "classes" repetitive Pin
Member 56973910-Nov-20 6:25
Member 56973910-Nov-20 6:25 
AnswerRe: JSON "classes" repetitive Pin
Gerry Schmitz10-Nov-20 7:24
mveGerry Schmitz10-Nov-20 7:24 
GeneralRe: JSON "classes" repetitive Pin
Member 56973910-Nov-20 8:06
Member 56973910-Nov-20 8:06 
GeneralRe: JSON "classes" repetitive Pin
Gerry Schmitz10-Nov-20 14:33
mveGerry Schmitz10-Nov-20 14:33 
QuestionColor the intersected rectangles in c# windows applicaion Pin
Member 147377589-Nov-20 19:47
Member 147377589-Nov-20 19:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.