ASP.NET ContentPlaceHolder - How to Register Data within MySql

89 Views Asked by At

I have 2 MasterPages (A main MasterPage and Simple MasterPage) I use only the Simple one with my other pages. Here part of my program:

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<div id="main_content">
    <div id="description">
    <br />
    Name : <asp:TextBox ID="TextName" Text="" runat="server" />
    Image :<asp:Image ID="Image1" runat="server" Height="20px" />

...</div></asp:Content>

How to register data (ex. name) and an image in a database?

I tried with:

name = Request.Form["ctl00$ContentPlaceHolderMainContent$TextName"];
name = Request.Form["ctl00$MainContent$TextName"];   
img = ???

But I only saw a space with NULL in the database.

0

There are 0 best solutions below