Airtel Demo — Demo

Address:620001
Website:demo

Using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class author_add_books : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = Session["authid"].ToString();
Label2.Text = Session["authname"].ToString();
Label4.Text = DateTime.Now.ToString("dd:MM:yyyy");

}
protected void Button1_Click(object sender, EventArgs e)
{
Random rnd = new Random();
Label3.Text = rnd.Next(0, 8989898).ToString();
FileUpload1.FileName.ToString();
String f1;
String bookname="";
String regno = Label3.Text;


if (FileUpload1.HasFile)
{
f1 = FileUpload1.FileName.Replace(FileUpload1.FileName, regno);
FileUpload1.SaveAs(Request.PhysicalApplicationPath + @"\books\" + f1 + ".pdf");
String fileExt = System.IO.Path.GetExtension(FileUpload1.FileName);

bookname = @"~\books\" + f1 + ".pdf";
}

if (FileUpload2.HasFile)
{
FileUpload2.SaveAs(Request.PhysicalApplicationPath + @"\multimedia\"+FileUpload2.FileName);
}
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|datadirectory|\book_publish.mdf;Integrated Security=True;User Instance=True");
con.Open();
SqlCommand cmd = new SqlCommand("insert into new_books values('" + TextBox1.Text + "', '" + TextBox2.Text + "', '" + Label1.Text + "', '" + Label2.Text + "', '" + Label3.Text + "', '" + Label4.Text + "', '" + bookname + "', '" + ListBox1.SelectedItem.ToString() + "', '"+ FileUpload2.FileName +"')", con);
cmd.ExecuteNonQuery();
Label5.Text = "Book details uploaded.."+bookname;
}
}
Was this information helpful?
No (0)
Yes (0)
Airtel customer support has been notified about the posted complaint.
Complaint comments 

Post your Comment

    I want to submit Complaint Positive Review Neutral Comment
    code
    By clicking Submit you agree to our Terms of Use
    Submit
    Airtel
    customer care contact
    Customer satisfaction rating Customer satisfaction rating is a complex algorithm that helps our users determine how good a company is at responding and resolving complaints by granting from 1 to 5 stars for each complaint and then ultimately combining them all for an overall score.
    Read more
    42%
    Complaints
    54508
    Pending
    0
    Resolved
    21959
    Airtel Phone
    +91 96 6339 5551
    +91 11 4266 6500 [Head Office]
    +91 11 4666 6100 [Head Office]
    Airtel Address
    20, Sarakki Main Road, JP Nagar 1st Phase, Bangalore, Karnataka, India - 560078
    View all Airtel contact information