Posts

Write a program to change color of Label text control programmatically in Asp.Net.

Image
Design: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>    <asp:Label ID="lboutput" runat="server" Text="Welcome in Code Solution "></asp:Label>         <br />    <asp:Button ID="btnred" runat="server" Text="" BackColor="Red" onclick="btnred_Click" />         &nbsp;&nbsp;    <asp:Button ID="btnblue" runat="server" Text="" BackColor="Blue" onclick="btnblue_Click" />         &nbsp;&nbsp;     <asp:Button ID="btngreen" runat="server" Te...

Write a program to check whether empty query string is entered in Asp.Net.

Image
Take an one web Page give any Suitable name as you want. Here Page taken with the name of Default1.aspx Page1: Default1.aspx Design: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>         <br />         <asp:TextBox ID="txtUserid" runat="server"></asp:TextBox>         <br />          <asp:Button ID="QuerySend" runat="server" onclick="QuerySend_Click" Text="Send"/>     </div>     </form> </body> </html> Code:- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; usin...

Mandavrayji Temple, Muli, Surendranagar, Gujarat

Image
There is a temple of Almighty sun called “Mandavrayji mandir” ,which is also the spiritual center and “Ishtdev” of Parmar Kshatriya Rajputs . It is said that one of the Parmar King Sachoji was a big donor and worshiper of MandavrayjiDada .He has a rule of giving any thing which is asked to him. Once he was being asked to give a lion alive and by the help of MandavrayjiDada he was able to give that lion alive till today this fact is so much popular in Muli village. Its really great place to visit..

Write C# code to display the asterisk pattern as shown below:
*****
*****
*****
*****
*****

Image
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace asteriskpattern {     class Program     {         static void Main(string[] args)         {             int n = 5, i, j;             for (i = 1; i <= n; i++)             {                 for (j = 1; j <= n; j++)                 {                     Console.Write("*");                 }                 Console.Write("\n");             }             Console.ReadKey();         }     } } Output: ***** ***** ***** *...

C# code to prompt a user to input his/her name and country name and then the output will be shown as like: Hello Ram from country India!

Image
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace writenameandcountry {     class Program     {         static void Main(string[] args)         {             Console.WriteLine("Enter your name:");             string name = Console.ReadLine();             Console.WriteLine("Enter your country name:");             string country = Console.ReadLine();             Console.WriteLine("Hello {0} from country {1}!", name, country);             Console.ReadKey();         }     } } Output: Enter your name: Ram Enter your country name: India Hello Ram from country India!