Click here to Skip to main content
15,905,967 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Distinguishing dialup users from broadband users without javascript Pin
Dennis Dykstra6-Dec-09 14:00
Dennis Dykstra6-Dec-09 14:00 
GeneralRe: Distinguishing dialup users from broadband users without javascript Pin
Abhishek Sur6-Dec-09 20:58
professionalAbhishek Sur6-Dec-09 20:58 
QuestionServing multiple ads on single ad using AdRotator Pin
Krishhhhhhhhhhhhhh6-Dec-09 8:02
Krishhhhhhhhhhhhhh6-Dec-09 8:02 
AnswerRe: Serving multiple ads on single ad using AdRotator Pin
Abhishek Sur6-Dec-09 9:16
professionalAbhishek Sur6-Dec-09 9:16 
GeneralRe: Serving multiple ads on single ad using AdRotator Pin
Krishhhhhhhhhhhhhh6-Dec-09 19:16
Krishhhhhhhhhhhhhh6-Dec-09 19:16 
GeneralRe: Serving multiple ads on single ad using AdRotator Pin
Abhishek Sur6-Dec-09 20:56
professionalAbhishek Sur6-Dec-09 20:56 
GeneralRe: Serving multiple ads on single ad using AdRotator Pin
Krishhhhhhhhhhhhhh6-Dec-09 21:58
Krishhhhhhhhhhhhhh6-Dec-09 21:58 
QuestionHelp me update product [modified] Pin
trinhitc6-Dec-09 6:08
trinhitc6-Dec-09 6:08 
public partial class admin_edit_sach : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            laysach();
        }
    }
    private void laysach()
    {
        int masach = int.Parse(Request.QueryString["id"].ToString());
        String StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/QLBansach.mdb");
        OleDbConnection cnn = new OleDbConnection(StrCnn);
        cnn.Open();
        OleDbCommand cmd = cnn.CreateCommand();
        cmd.CommandText = "select *  from Sach where MaCD=" + masach;
        OleDbDataAdapter da = new OleDbDataAdapter();
        da.SelectCommand = cmd;
        DataSet ds = new DataSet();
        da.Fill(ds);
        txtTenSach.Text = ds.Tables[0].Rows[0]["Tensach"].ToString();
        DropChuDe.SelectedValue = ds.Tables[0].Rows[0]["MaCD"].ToString();
        DropNXB.SelectedValue = ds.Tables[0].Rows[0]["MaNXB"].ToString();
        txtDonGia.Text = ds.Tables[0].Rows[0]["Dongia"].ToString();
        Calendar1.SelectedDate = ds.Tables[0].Rows[0]["Ngaycapnhat"].ToString;
        FileUpload1.FileName = ds.Tables[0].Rows[0]["Hinhminhhoa"].ToString();
        txtMoTa.Text = ds.Tables[0].Rows[0]["Mota"].ToString();
        cnn.Close();
    }
    protected void Btupdate_Click(object sender, EventArgs e)
    {
        int masach = int.Parse(Request.QueryString["id"].ToString());
        String StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Server.MapPath("~/App_Data/QLBansach.mdb");
        OleDbConnection cnn = new OleDbConnection(StrCnn);
        cnn.Open();
        OleDbCommand cmd = new OleDbCommand();
        cmd.Connection = cnn;
        cmd.CommandType = CommandType.Text;
        cmd.CommandText = "UPDATE Sach SET Tensach='" + txtTenSach.Text + "','" + DropChuDe.SelectedValue + "','" + DropNXB.SelectedValue + "','" + txtDonGia.Text + "','" + Calendar1.SelectedDate.Day + "/" + Calendar1.SelectedDate.Month + "/" + Calendar1.SelectedDate.Year + "','" + FileUpload1.FileName + "','" + txtMoTa.Text + "' Where MaNXB=" + masach;
        cmd.ExecuteNonQuery();
        cnn.Close();
        Response.Redirect("~/Admin/ds_sach.aspx");
    }
}


Erros
ompilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0428: Cannot convert method group 'GetType' to non-delegate type 'System.DateTime'. Did you intend to invoke the method?

Source Error:

Line 36:         DropNXB.SelectedValue = ds.Tables[0].Rows[0]["MaNXB"].ToString();
Line 37:         txtDonGia.Text = ds.Tables[0].Rows[0]["Dongia"].ToString();
Line 38:         Calendar1.SelectedDate = ds.Tables[0].Rows[0]["Ngaycapnhat"].GetType; // Error
Line 39:         FileUpload1.FileName = ds.Tables[0].Rows[0]["Hinhminhhoa"].ToString();  //Error
Line 40:         txtMoTa.Text = ds.Tables[0].Rows[0]["Mota"].ToString();


modified on Sunday, December 6, 2009 2:50 PM

AnswerRe: Help me update product Pin
Abhishek Sur6-Dec-09 8:09
professionalAbhishek Sur6-Dec-09 8:09 
AnswerRe: Help me update product Pin
Krishhhhhhhhhhhhhh6-Dec-09 8:11
Krishhhhhhhhhhhhhh6-Dec-09 8:11 
QuestionNeed help with converting Chart().DataFormula outputs into an array/arraylist Pin
James Shao6-Dec-09 5:14
James Shao6-Dec-09 5:14 
QuestionThe problem of usng IIS for publishing ASP.net website Pin
Seraph_summer6-Dec-09 3:35
Seraph_summer6-Dec-09 3:35 
AnswerRe: The problem of usng IIS for publishing ASP.net website Pin
Abhijit Jana6-Dec-09 7:16
professionalAbhijit Jana6-Dec-09 7:16 
GeneralRe: The problem of usng IIS for publishing ASP.net website Pin
Seraph_summer7-Dec-09 9:31
Seraph_summer7-Dec-09 9:31 
GeneralRe: The problem of usng IIS for publishing ASP.net website Pin
Seraph_summer7-Dec-09 9:49
Seraph_summer7-Dec-09 9:49 
QuestionImport data from Xml to sql in vs2003 Pin
<<Tash18>>6-Dec-09 1:28
<<Tash18>>6-Dec-09 1:28 
AnswerRe: Import data from Xml to sql in vs2003 Pin
N a v a n e e t h6-Dec-09 2:22
N a v a n e e t h6-Dec-09 2:22 
GeneralRe: Import data from Xml to sql in vs2003 Pin
<<Tash18>>6-Dec-09 2:32
<<Tash18>>6-Dec-09 2:32 
GeneralRe: Import data from Xml to sql in vs2003 Pin
N a v a n e e t h6-Dec-09 2:45
N a v a n e e t h6-Dec-09 2:45 
QuestionIdentifying system process. Pin
srikantha_nagaraj5-Dec-09 18:51
srikantha_nagaraj5-Dec-09 18:51 
AnswerRe: Identifying system process. Pin
N a v a n e e t h5-Dec-09 19:02
N a v a n e e t h5-Dec-09 19:02 
AnswerRe: Identifying system process. Pin
Abhishek Sur5-Dec-09 22:19
professionalAbhishek Sur5-Dec-09 22:19 
GeneralRe: Identifying system process. [modified] Pin
N a v a n e e t h6-Dec-09 2:00
N a v a n e e t h6-Dec-09 2:00 
GeneralRe: Identifying system process. Pin
Abhishek Sur6-Dec-09 7:31
professionalAbhishek Sur6-Dec-09 7:31 
AnswerRe: Identifying system process. Pin
Abhijit Jana6-Dec-09 0:36
professionalAbhijit Jana6-Dec-09 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.