Click here to Skip to main content
15,903,203 members
Home / Discussions / C#
   

C#

 
QuestionHow can I create a ImageList property,that I can set at design-time? PLEASE HELP! Pin
ctoma200512-May-08 4:15
ctoma200512-May-08 4:15 
AnswerRe: How can I create a ImageList property,that I can set at design-time? PLEASE HELP! Pin
led mike12-May-08 4:20
led mike12-May-08 4:20 
GeneralRe: How can I create a ImageList property,that I can set at design-time? PLEASE HELP! Pin
ctoma200512-May-08 4:32
ctoma200512-May-08 4:32 
GeneralRe: How can I create a ImageList property,that I can set at design-time? PLEASE HELP! Pin
ctoma200512-May-08 4:33
ctoma200512-May-08 4:33 
AnswerRe: How can I create a ImageList property,that I can set at design-time? PLEASE HELP! Pin
tgrt12-May-08 4:44
tgrt12-May-08 4:44 
GeneralRe: How can I create a ImageList property,that I can set at design-time? PLEASE HELP! Pin
ctoma200512-May-08 4:57
ctoma200512-May-08 4:57 
GeneralRe: How can I create a ImageList property,that I can set at design-time? PLEASE HELP! Pin
ctoma200512-May-08 5:09
ctoma200512-May-08 5:09 
QuestionEmpty Textbox ?? Pin
LeSquale12-May-08 3:42
LeSquale12-May-08 3:42 
Hi
I try to develop an Web Application to manage films (a little bit like ImDB)

For the Edit part, I fill textboxes with a Linq query (on loading).
No problem to display the information in the different textboxes

But when I want to save changes into the database,
my textboxes are empty (according to the debugger) even if I put a value in it.

A part of my code to do this edition :
Loading :
<br />
DBMovies_ClassesDataContext db = new DBMovies_ClassesDataContext();<br />
<br />
                int IdFilm = int.Parse(Session["idfilm"].ToString());<br />
<br />
                var editedfilm =<br />
                    (from f in db.Films<br />
                    where f.id == IdFilm<br />
                    select new { Title = f.title, Title_o = f.title_original, Language = f.language, DateRelease = f.date_release, Genre = f.genre, Runtime = f.runtime, Plot = f.plot, Country = f.country }).Single();<br />
<br />
<br />
                txtCountry.Text = editedfilm.Country.ToString();<br />
                txtDateRelease.Text = editedfilm.DateRelease.ToString();<br />
                txtGenre.Text = editedfilm.Genre.ToString();<br />
                txtLanguage.Text = editedfilm.Language.ToString();<br />
                txtPlot.Text = editedfilm.Plot.ToString();<br />
                txtRuntime.Text = editedfilm.Runtime.ToString();<br />
                txtTitle.Text = editedfilm.Title.ToString();<br />
                txtTitle_o.Text = editedfilm.Title_o.ToString();<br />
<br />


Code to update values in DB :

<br />
<br />
                DBMovies_ClassesDataContext db = new DBMovies_ClassesDataContext();<br />
<br />
<br />
                int IdFilm = int.Parse(Session["idfilm"].ToString());<br />
<br />
                var updateFilm = (from f in db.Films<br />
                                  where f.id == IdFilm<br />
                                  select f).Single();<br />
<br />
<br />
                updateFilm.country = form1.FindControl(txtCountry.ID).ToString();<br />
                <br />
                updateFilm.country = txtCountry.Text.ToString();<br />
                updateFilm.title = txtTitle.Text.ToString();<br />
                updateFilm.title_original = txtTitle_o.Text.ToString();<br />
                updateFilm.language = txtLanguage.Text.ToString();<br />
                if (txtDateRelease.Text != "") { updateFilm.date_release = DateTime.Parse(txtDateRelease.Text); }<br />
                updateFilm.genre = txtGenre.Text.ToString();<br />
                if (txtRuntime.Text != "") { updateFilm.runtime = Int32.Parse(txtRuntime.Text); }<br />
                updateFilm.plot = txtPlot.Text.ToString();<br />
<br />
                db.SubmitChanges();<br />
<br />


and an exemple of my textboxes :

<asp:label id="lblCountry" runat="server" text="Country : "></asp:label><br />
<asp:textbox id="txtCountry" runat="server"></asp:textbox>


All the elements are working well
It's just the empty textboxes which ruin everything Frown | :(

Thank you by advance
(and sorry if there are english mistakes)

Cedric.
QuestionNeed PrictureBox with panning & zooming large images. Pin
hdv21212-May-08 3:24
hdv21212-May-08 3:24 
AnswerRe: Need PrictureBox with panning & zooming large images. Pin
Giorgi Dalakishvili12-May-08 3:53
mentorGiorgi Dalakishvili12-May-08 3:53 
QuestionProblem in accessing Shared Folder rights Pin
Deepali Dhingra12-May-08 2:41
professionalDeepali Dhingra12-May-08 2:41 
QuestionRegarding logic as to use Serilization or simple text file Pin
tasumisra12-May-08 2:19
tasumisra12-May-08 2:19 
AnswerRe: Regarding logic as to use Serilization or simple text file Pin
Rupesh Kumar Swami12-May-08 2:30
Rupesh Kumar Swami12-May-08 2:30 
GeneralRe: Regarding logic as to use Serilization or simple text file Pin
tasumisra12-May-08 2:35
tasumisra12-May-08 2:35 
GeneralRe: Regarding logic as to use Serilization or simple text file Pin
tasumisra12-May-08 2:37
tasumisra12-May-08 2:37 
GeneralRe: Regarding logic as to use Serilization or simple text file Pin
Rupesh Kumar Swami12-May-08 4:48
Rupesh Kumar Swami12-May-08 4:48 
QuestionObjectDisposedException Pin
George_George12-May-08 2:06
George_George12-May-08 2:06 
AnswerRe: ObjectDisposedException Pin
N a v a n e e t h12-May-08 2:14
N a v a n e e t h12-May-08 2:14 
GeneralRe: ObjectDisposedException Pin
George_George12-May-08 2:18
George_George12-May-08 2:18 
GeneralRe: ObjectDisposedException Pin
N a v a n e e t h12-May-08 2:22
N a v a n e e t h12-May-08 2:22 
GeneralRe: ObjectDisposedException Pin
George_George12-May-08 2:25
George_George12-May-08 2:25 
GeneralRe: ObjectDisposedException Pin
N a v a n e e t h12-May-08 2:31
N a v a n e e t h12-May-08 2:31 
GeneralRe: ObjectDisposedException Pin
George_George12-May-08 2:39
George_George12-May-08 2:39 
GeneralRe: ObjectDisposedException Pin
George_George12-May-08 2:44
George_George12-May-08 2:44 
GeneralRe: ObjectDisposedException Pin
N a v a n e e t h12-May-08 3:15
N a v a n e e t h12-May-08 3:15 

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.