Click here to Skip to main content
15,884,298 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Arabic data is not displaying properly while exporting data to csv Pin
Khaja A. Imtiaz27-Sep-09 1:56
Khaja A. Imtiaz27-Sep-09 1:56 
GeneralRe: Arabic data is not displaying properly while exporting data to csv Pin
N a v a n e e t h27-Sep-09 2:08
N a v a n e e t h27-Sep-09 2:08 
GeneralRe: Arabic data is not displaying properly while exporting data to csv Pin
Khaja A. Imtiaz27-Sep-09 2:36
Khaja A. Imtiaz27-Sep-09 2:36 
AnswerRe: Arabic data is not displaying properly while exporting data to csv Pin
Abhishek Sur27-Sep-09 9:30
professionalAbhishek Sur27-Sep-09 9:30 
GeneralRe: Arabic data is not displaying properly while exporting data to csv Pin
Khaja A. Imtiaz27-Sep-09 21:27
Khaja A. Imtiaz27-Sep-09 21:27 
QuestionWhere is my database??? Pin
hasani200727-Sep-09 0:56
hasani200727-Sep-09 0:56 
AnswerRe: Where is my database??? Pin
Abhijit Jana27-Sep-09 1:01
professionalAbhijit Jana27-Sep-09 1:01 
QuestionLoad data into detailsview via C# Pin
_ASPAle_26-Sep-09 23:37
_ASPAle_26-Sep-09 23:37 
Hello everyone, I always apologize for my English not perfect. Anyway I wanted to ask you how to load data in a DetailsView without using the SqlDataSource control. I want to load data using only C #, are familiar with the property "DetailsView1.DataSource = fuction ();"
but I'm not sure how it works, someone can explain it to me?

Here's the code that I wrote:
<br />
    protected void Page_Load(object sender, EventArgs e)<br />
    {<br />
     DetailsView1.DataSource = aggiorna();<br />
     DetailsView1.DataBind();   <br />
    }<br />
    public DataTable aggiorna()<br />
    {<br />
        string IDModelloQ = Request.QueryString["IDModelloV"];<br />
        SqlCommand comando = new SqlCommand();<br />
        SqlConnection connessione = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString);<br />
        connessione.Open();<br />
        comando.Connection = connessione;<br />
        comando.CommandType = CommandType.Text;<br />
        comando.CommandText = "SELECT * FROM Automobili WHERE IDModello=" + IDModelloQ;<br />
        try<br />
        {<br />
            comando.ExecuteNonQuery();<br />
            <br />
        }<br />
        catch (Exception ex)<br />
        {<br />
            throw ex;<br />
        }<br />
        finally<br />
        {<br />
            connessione.Close();<br />
        }<br />
   return   What must return!?<br />
   }<br />


My problem is that I don't know that since returning from the function "aggiorna ()".
AnswerRe: Load data into detailsview via C# Pin
N a v a n e e t h26-Sep-09 23:58
N a v a n e e t h26-Sep-09 23:58 
GeneralRe: Load data into detailsview via C# Pin
_ASPAle_27-Sep-09 0:10
_ASPAle_27-Sep-09 0:10 
GeneralRe: Load data into detailsview via C# Pin
Abhijit Jana27-Sep-09 0:15
professionalAbhijit Jana27-Sep-09 0:15 
GeneralRe: Load data into detailsview via C# Pin
_ASPAle_27-Sep-09 0:17
_ASPAle_27-Sep-09 0:17 
GeneralRe: Load data into detailsview via C# Pin
N a v a n e e t h27-Sep-09 0:19
N a v a n e e t h27-Sep-09 0:19 
GeneralRe: Load data into detailsview via C# Pin
_ASPAle_27-Sep-09 1:12
_ASPAle_27-Sep-09 1:12 
GeneralRe: Load data into detailsview via C# Pin
N a v a n e e t h27-Sep-09 1:41
N a v a n e e t h27-Sep-09 1:41 
AnswerRe: Load data into detailsview via C# Pin
khaleel the kiraak27-Sep-09 10:41
khaleel the kiraak27-Sep-09 10:41 
QuestionAbout ASP.NET application Hosting Pin
jahirhstu26-Sep-09 23:27
jahirhstu26-Sep-09 23:27 
AnswerRe: About ASP.NET application Hosting [modified] Pin
Abhishek Sur27-Sep-09 9:56
professionalAbhishek Sur27-Sep-09 9:56 
Questionabout publishing website [modified] Pin
hasani200726-Sep-09 23:08
hasani200726-Sep-09 23:08 
AnswerRe: about publishing website Pin
Abhijit Jana26-Sep-09 23:14
professionalAbhijit Jana26-Sep-09 23:14 
GeneralRe: about publishing website Pin
sashidhar26-Sep-09 23:19
sashidhar26-Sep-09 23:19 
AnswerRe: about publishing website Pin
sashidhar26-Sep-09 23:17
sashidhar26-Sep-09 23:17 
AnswerRe: about publishing website Pin
sashidhar26-Sep-09 23:20
sashidhar26-Sep-09 23:20 
GeneralRe: about publishing website Pin
hasani200727-Sep-09 0:52
hasani200727-Sep-09 0:52 
AnswerRe: about publishing website Pin
sashidhar27-Sep-09 1:55
sashidhar27-Sep-09 1:55 

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.