How can i match the custom control to the content container in Sitefinity.Search the answer for that question.
but i can't get the answer.
My source code is
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Wiki Control.ascx.cs" Inherits="Wiki_Control" %>
<asp:Label ID="Label1" runat="server" Style="z-index: 100; left: 248px; position: absolute;
top: 128px" Text="Wiki name"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Style="z-index: 101; left: 352px; position: absolute;
top: 128px"></asp:TextBox>
<asp:Label ID="Label2" runat="server" Style="z-index: 102; left: 256px; position: absolute;
top: 176px" Text="Wiki title"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" Style="z-index: 103; left: 352px; position: absolute;
top: 176px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Style="z-index: 105;
left: 328px; position: absolute; top: 232px" Text="Insert" />
My c# code is
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Wiki_Control : System.Web.UI.UserControl
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=usercontrol;Integrated Security=True");
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("insert control values('" + TextBox1.Text + "','" + TextBox2.Text + "')", con);
cmd.ExecuteNonQuery();
Response.Write("Inserted Successfully.");
con.Close();
}
}
I installed the Sitefinity_3_7_2057_ standard trial version.
I had upload the control.But I can't apt the control to content container in Sitefinity