Posts

protected void btnCreate_Click(object sender, EventArgs e)     {         try         {             server = txtServer.Text.ToString();             database = txtData.Text.ToString();             userid = txtUser.Text.ToString();             password = txtPassword.Text.ToString();             try             {                 System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");                 System.Configuration.KeyValueConfigurationElement setting = config.AppSettings.Settings["MyValue"];                 if (null != setting)          ...
string file_name = "D:\\Project\\test1.sql";         string text_line = "";         string obj;         obj = txtWrite.Text.ToString();         System.IO.StreamWriter  objwriter;         objwriter = new System.IO.StreamWriter(file_name);         string[] aryLines = new string[1];         aryLines[0] = "use";           for (int i = 0; i < 1; i++)         {             text_line = text_line + aryLines[i];             objwriter.Write(aryLines[i]);             objwriter.Write(txtWrite.Text);         }                     objwriter.Close();
string file_name = "D:\\Project\\test1.sql";         string text_line = "";         string obj;         obj = txtWrite.Text.ToString();         System.IO.StreamWriter  objwriter;         objwriter = new System.IO.StreamWriter(file_name);         string[] aryLines = new string[1];         aryLines[0] = "use";         for (int i = 0; i < 1; i++)         {             text_line = text_line + aryLines[i];             objwriter.WriteLine(aryLines[i]);             Console.WriteLine(obj);         }                   objwriter.Close();
select EnrollmentNo =(select enrollmentNo from StudentMst where Student_ID = a.Student_ID),  a.Hobbies,a.MedicalConditions,  a.Emergency_Note,a.FatherOccupation,a.FatherDesignation,a.Father_Qual,    a.Monthly_Income,a.MotherOccupation,a.MotherDesignation,    Parent_MobileNo =(select Mobile from ParentMst where ParentID = (select top 1 ParentID from Parent_Student_Rel where Student_ID = a.Student_ID )),    a.Prev_School_Percentage,    a.Prev_School_Rank,a.Prev_School_FromDate,a.Prev_School_Todate,a.Father_FirstName,a.Father_LastName,a.Mother_FirstName  from Student_Detail a
CREATE PROCEDURE [dbo].[SchoolMstShowFull]                   (                 @UserID int,             @UserType   varchar(100),                @searchtext varchar(100)=null                      )                     AS                       BEGIN                 declare             @LoginID int,             @Cause varchar(10)             if(@UserType='SAdmin' and @LoginID=1)                 Begin                 set @LoginID=-1       ...
HTML   1. What is the preferred way for adding a background color in HTML?         A.)  <BODY BACKGROUND="YELLOW">         B.) <BODY STYLE="BACKGROUND-COLOR: YELLOW">         C.) <BACKGROUND>YELLOW</BACKGROUND> 2. WHAT IS THE CORRECT HTML FOR CREATING A HYPERLINK?        A.)     <a name="#">A</a>        B.)    <a href="http://www.iVerticals.in">example</a>        C.)    <a url="http://www.iVerticals.in ">example</a> 3. .How can you open a link in a new browser window?       A.)    <a href="url" new>       B.)  <a href="url" target="new">       C.)  <a...

Asp Login Form

SQL Procedure alter PROCEDURE [dbo].[LoginPro]   @Email as varchar(50), @password as varchar(50)   AS   BEGIN   SELECT Email, Password FROM Registration WHERE Email=@Email AND Password=@Password --we compare the values from the application we got with the values in the database       END Login Page protected void Btn_Login_Click(object sender, EventArgs e)     {        // int k = 0;         string user;         string pass;             user = txtusername.Text.ToString();             pass = txtpassword.Text.ToString();             if (user == "" || pass == "")             {                 lblMsg.Text = "can't blank user name and password";             }   ...