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
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 |
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 |
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 |
Any alternative to avoid name collisions other then Namespaces?
Explain the significance of routing? : asp.net mvc
Explain the steps needed to be performed in order to create an animation in xaml?
What is an assembly? Explain its parts.
what is strong name?
4 Answers Fidelity, Infosys, Microsoft, Shriram Value Services,
What is recordset asp?
What is web.config. How many web.config files can be allowed to use in an application?
6 Answers Accenture, HCL, InterGraph, iSoft,
Explain the difference between authentication and authorization.
What is asp short for?
Difference between using directive vs using statement?
Difference between web user control and web custom control?
Which is the namespace used to write error message in event Log File?