Take one textbox if I am inputting abc alphabet in capital
letter or in small letter on the button click it will be
bcd or if I enter 123 and it would be 234 like that in
ASP.NET?

Answers were Sorted based on User's Feedback



Take one textbox if I am inputting abc alphabet in capital letter or in small letter on the button..

Answer / nitin kumar nitin@bbspl.com

string str;
str = text4.Text;
string one, two,three;
string four;
char dd;

one = str.Substring(1,2);
three = str.Substring(2, 1);

two = one;
four = three;
dd=char.Parse(four);

int con = Convert.ToInt32(((int)dd).ToString());
string str1 = char.ConvertFromUtf32(con+1);
text5.Text = two + str1;

Is This Answer Correct ?    11 Yes 2 No

Take one textbox if I am inputting abc alphabet in capital letter or in small letter on the button..

Answer / sagnikmukh

i am posting the basic logic,

class Program
{
static void Main(string[] args)
{
string test = "123";
StringBuilder st=new StringBuilder ();
int l;
l = test.Length;
for (int i = l; i > 0; i--)
{
st = st.Append(test.Substring(i - 1,
1).ToString ());
}
Console.WriteLine(st.ToString ());
Console.Read();
}
}

this will be the Button event in ASP.NEt Page.

Is This Answer Correct ?    2 Yes 0 No

Take one textbox if I am inputting abc alphabet in capital letter or in small letter on the button..

Answer / sharumathi

protected void Button1_Click(object sender, EventArgs e)
{
string str = TextBox1.Text;
byte[] a = System.Text.Encoding.ASCII.GetBytes(str);
byte[] b = { a[1], a[2], (++a[2]) };
string x = System.Text.Encoding.ASCII.GetString(b);
TextBox2.Text = x;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

How do you create a master page?

0 Answers  


How to send data through querystring to another page but it should not be displayed in URL

2 Answers   EMR, Powersoft19,


If there is submit button in a from tell us the sequence what happens if submit is clicked and in form action is specified as some other page ?

1 Answers   MMTS,


Differentiate between Server Transfer and Response Redirect?

2 Answers   DELL, Siebel, TCS,


I am using SQLServer 2005. I have one table called Drivers. Every day thousands of records will be added in this table. I have to show all these records in my GridView with out applying ajax timer beacause we don't know the time limit when the new record come to the table. Sometimes it will add for 10 seconds some times 20 seconds. There by Please try without using timer or any other soultion apply for the table in sqlserver. But, i want to see all records immediately when new record comes in table. How? Thanks in advance... Ramesh

5 Answers  






what is the trace in ASP.NET

4 Answers  


In which situation can you not use a viewstate?

0 Answers  


What kind of programming language is ASP.NET?

0 Answers   3i Infotech,


How can we inherit a static variable?

0 Answers  


About Global .asax ?

6 Answers   Satyam,


Is react a template engine?

0 Answers  


Can we store object in viewstate?

0 Answers  


Categories