Click here to Skip to main content
15,867,308 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Problem with an ajaxControl ModalPopUpExtender Pin
pyde15-Apr-08 8:56
pyde15-Apr-08 8:56 
Questionwhat is the difference between atlas:scriptmanager and asp:scriptmanager Pin
Tridip Bhattacharjee15-Apr-08 1:32
professionalTridip Bhattacharjee15-Apr-08 1:32 
AnswerRe: what is the difference between atlas:scriptmanager and asp:scriptmanager Pin
Christian Graus15-Apr-08 1:33
protectorChristian Graus15-Apr-08 1:33 
GeneralRe: what is the difference between atlas:scriptmanager and asp:scriptmanager Pin
Broken Bokken15-Apr-08 2:48
Broken Bokken15-Apr-08 2:48 
GeneralRe: what is the difference between atlas:scriptmanager and asp:scriptmanager Pin
Tridip Bhattacharjee16-Apr-08 19:56
professionalTridip Bhattacharjee16-Apr-08 19:56 
GeneralDisplaying Image Problem in FireFox Pin
sjs4u15-Apr-08 0:40
sjs4u15-Apr-08 0:40 
GeneralRe: Displaying Image Problem in FireFox [modified] Pin
Ashish Sehajpal15-Apr-08 1:06
Ashish Sehajpal15-Apr-08 1:06 
GeneralDynamic User control load get a parameter Pin
simsen14-Apr-08 23:51
simsen14-Apr-08 23:51 
I have a problem how I get the user controls parameter from codebehind (when I make a dynamic instans of this) on the page.

My user control ascx file:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TestSetProject.ascx.cs" Inherits="UserControls_TestSetProject" %>

<center><h3><asp:Label ID="lblEditProjectHeadline" runat="server" Text="Projektdetaljer for"></asp:Label> 
<asp:Label ID="lblEditProjectNameHeadline" runat="server" Text=""></asp:Label></h3></center><br /> 


My user control ascx.cs file:
using System;
using System.Data;
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;

public partial class UserControls_TestSetProject : System.Web.UI.UserControl
{
    private string _ProjectId = "";
    public string ProjectId
    {
        get { return _ProjectId; }
        set { _ProjectId = value; }
    }
    
    protected void Page_Load(object sender, EventArgs e)
    {
        lblEditProjectNameHeadline.Text = ProjectId;
    }
}


My test aspx page:
<%@ Page Language="C#" MasterPageFile="~/MPHead.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Content_Test" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Label ID="lblNewProjectEditProjectId" runat="server" Text="" Visible="false"></asp:Label><br /><br />
<asp:Button ID="btnPush" runat="server" Text="Push me" OnClick="btnPush_Click" />
<asp:PlaceHolder ID="phNewProjectEdit" runat="server"></asp:PlaceHolder>
</asp:Content>


My test aspx.cs file:
using System;
using System.Data;
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;

public partial class Content_Test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Control setproject = LoadControl("~/UserControls/TestSetProject.ascx");
        phNewProjectEdit.Controls.Add(setproject);

    }
    protected void btnPush_Click(object sender, EventArgs e)
    {
        lblNewProjectEditProjectId.Text = "15855";
    }
}


What I need, is that the user control will be instansiated (created) when I click on the btnpush button on the page og then takes what I have wrote in the lblNewProjectEditProjectId.Text into the user control (where I then can use it).

Can anybody please help me on this?

Kind regards,
simsen Smile | :)
GeneralRe: Dynamic User control load get a parameter Pin
Christian Graus15-Apr-08 0:27
protectorChristian Graus15-Apr-08 0:27 
GeneralRe: Dynamic User control load get a parameter Pin
simsen15-Apr-08 0:44
simsen15-Apr-08 0:44 
GeneralRe: Dynamic User control load get a parameter Pin
Christian Graus15-Apr-08 0:49
protectorChristian Graus15-Apr-08 0:49 
GeneralRe: Dynamic User control load get a parameter Pin
simsen15-Apr-08 1:05
simsen15-Apr-08 1:05 
GeneralRe: Dynamic User control load get a parameter Pin
Ashish Sehajpal15-Apr-08 1:16
Ashish Sehajpal15-Apr-08 1:16 
GeneralRe: Dynamic User control load get a parameter Pin
Christian Graus15-Apr-08 1:24
protectorChristian Graus15-Apr-08 1:24 
GeneralRe: Dynamic User control load get a parameter Pin
simsen15-Apr-08 1:31
simsen15-Apr-08 1:31 
GeneralRe: Dynamic User control load get a parameter Pin
Christian Graus15-Apr-08 1:35
protectorChristian Graus15-Apr-08 1:35 
GeneralRe: Dynamic User control load get a parameter Pin
simsen15-Apr-08 1:41
simsen15-Apr-08 1:41 
GeneralRe: Dynamic User control load get a parameter Pin
Christian Graus15-Apr-08 1:54
protectorChristian Graus15-Apr-08 1:54 
GeneralRe: Dynamic User control load get a parameter Pin
simsen15-Apr-08 1:58
simsen15-Apr-08 1:58 
GeneralRe: Dynamic User control load get a parameter Pin
Christian Graus15-Apr-08 2:00
protectorChristian Graus15-Apr-08 2:00 
GeneralRe: Dynamic User control load get a parameter Pin
simsen15-Apr-08 2:23
simsen15-Apr-08 2:23 
GeneralRe: Dynamic User control load get a parameter Pin
Christian Graus15-Apr-08 11:03
protectorChristian Graus15-Apr-08 11:03 
GeneralRe: Dynamic User control load get a parameter Pin
Broken Bokken15-Apr-08 2:58
Broken Bokken15-Apr-08 2:58 
GeneralRe: Dynamic User control load get a parameter Pin
simsen15-Apr-08 3:55
simsen15-Apr-08 3:55 
Questionroot node problme in sitemap file Pin
Sonia Gupta14-Apr-08 23:50
Sonia Gupta14-Apr-08 23:50 

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.