title: ASP.NET: How to add latest news & magazine to the Web Application without writing the Username
body: <p>I am developing a web application that enables the admin to add new and newsletter. For adding the news I have a table called news in the database that contains: NewsID, NewsTitle, NewsDescription, Username.
  Also, for the newsletter, the admin will upload the ma. For that, I created a table that contains MagazineID, MagazineTitle, Url, Username</p>
  
  <p>By the way, the username column in each one of them is a foreign key to the Users table. </p>
  
  <p>Now I have two questions:
  For adding news, I use ListView and everything works fine except for the username column. What I want is just giving the user the ability to fill two columns: NewsTitle and NewsDescription. and his username should be added automatically but how to do that?</p>
  
  <p>For adding news, I am using the following sql commands:</p>
  
  <pre><code>DeleteCommand="DELETE FROM [News] WHERE [NewsID] = @NewsID" 
  
  InsertCommand="INSERT INTO [News] ([NewsTitle], [NewsDesc])
                 VALUES (@NewsTitle, @NewsDesc)" 
  
  SelectCommand="SELECT News.NewsID, News.NewsTitle, News.NewsDesc, News.Username
                 FROM News
                 INNER JOIN employee ON News.Username = employee.Username" 
  
  UpdateCommand="UPDATE [News]
                 SET [NewsTitle] = @NewsTitle
                    , [NewsDesc] = @NewsDesc
                 WHERE [NewsID] = @NewsID"&gt;
  </code></pre>
  
  <p>For the magazine, also, I want to use the ListView and give the user the ability of putting the title and upload the magazine. My question is how to put UploadFile control inside the ListView.</p>