Click here to Skip to main content
15,885,366 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Need a regular expression validation Pin
Sandeep Mewara1-Jun-10 0:00
mveSandeep Mewara1-Jun-10 0:00 
QuestionReturn List<> on button click of user control. Pin
zeego31-May-10 21:21
zeego31-May-10 21:21 
AnswerRe: Return List on button click of user control. Pin
Brij31-May-10 21:34
mentorBrij31-May-10 21:34 
GeneralRe: Return List on button click of user control. Pin
zeego31-May-10 21:49
zeego31-May-10 21:49 
GeneralRe: Return List on button click of user control. Pin
michaelschmitt31-May-10 22:45
michaelschmitt31-May-10 22:45 
GeneralRe: Return List on button click of user control. Pin
zeego31-May-10 23:06
zeego31-May-10 23:06 
GeneralRe: Return List on button click of user control. Pin
michaelschmitt1-Jun-10 0:27
michaelschmitt1-Jun-10 0:27 
GeneralRe: Return List on button click of user control Pin
zeego1-Jun-10 1:19
zeego1-Jun-10 1:19 
Hi thanks for the reply, Ermm its not confusing but maybe too hitech for me.

I took the update button out of user control and made its method as a private method inside user control ,

I am trying to expose the updated collection though a public property of user control now. Only thing bothering me is that I cant call the private method inside user control and populate the collection on call of the public method of user control.

In presentation page I am calling the the public attribute but it is returning null right now because the private method is not called.


public partial class assets_WebControls_ftExclusions : System.Web.UI.UserControl
{
    private int _id;
    private ftExclusionsList _myftExclusions;

    public int ID
    {
        get{return _id;}
        set{_id=value;}
    }

    public ftExclusionsList selectedExclusions
    {
        get { return _myftExclusions; }
        set { _myftExclusions = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            cblExclusions.DataBind();
            ftExclusionsList myExcluList = ftExclusionsManager.ftExclusionsById(ID);
            if (myExcluList != null)
            {
                if (myExcluList.Count > 0 && myExcluList != null)
                {
                    foreach (ftExclusions ex in myExcluList)
                    {
                        cblExclusions.Items.FindByValue(ex.excluId.ToString()).Selected = true;
                    }
                }
            }
        }
        
    }
    
    private void SelectedExclusions()
    {
        ftExclusionsList myFTExclusionList = new ftExclusionsList();
        foreach (ListItem li in cblExclusions.Items)
        {
            if (li.Selected == true)
            {
                ftExclusions myftExclusion = new ftExclusions();
                myftExclusion.excluId = Convert.ToInt32(li.Value);
                myftExclusion.excludesc = li.Text.ToString();
                myFTExclusionList.Add(myftExclusion);
            }
         }
         selectedExclusions = myFTExclusionList;    
    }
}

GeneralRe: Return List on button click of user control Pin
michaelschmitt1-Jun-10 2:30
michaelschmitt1-Jun-10 2:30 
AnswerRe: Return List on button click of user control. Pin
Andreas X1-Jun-10 1:28
professionalAndreas X1-Jun-10 1:28 
Questiontext in windows service appears to have old reference Pin
Member 391904931-May-10 21:16
Member 391904931-May-10 21:16 
AnswerRe: text in windows service appears to have old reference Pin
Sandeep Mewara31-May-10 23:56
mveSandeep Mewara31-May-10 23:56 
GeneralRe: text in windows service appears to have old reference Pin
Member 39190491-Jun-10 5:53
Member 39190491-Jun-10 5:53 
AnswerRe: text in windows service appears to have old reference Pin
aashish.saalvi1-Jun-10 1:53
aashish.saalvi1-Jun-10 1:53 
QuestionDataView Pin
Satish_S31-May-10 20:58
Satish_S31-May-10 20:58 
AnswerRe: DataView Pin
Sandeep Mewara31-May-10 23:58
mveSandeep Mewara31-May-10 23:58 
Questiontrying to get windows service to auto-start after install Pin
Member 391904931-May-10 19:25
Member 391904931-May-10 19:25 
AnswerRe: trying to get windows service to auto-start after install Pin
Sandeep Mewara31-May-10 19:44
mveSandeep Mewara31-May-10 19:44 
Questionasp table with javascript getelementbyid Pin
Aljaz11131-May-10 14:53
Aljaz11131-May-10 14:53 
AnswerRe: asp table with javascript getelementbyid Pin
Sandeep Mewara31-May-10 19:17
mveSandeep Mewara31-May-10 19:17 
AnswerRe: asp table with javascript getelementbyid Pin
Amit M patel31-May-10 20:59
Amit M patel31-May-10 20:59 
GeneralRe: asp table with javascript getelementbyid Pin
Aljaz1111-Jun-10 3:33
Aljaz1111-Jun-10 3:33 
QuestionRun Web Application Under Evaluation Period. Pin
VikashGohil31-May-10 7:34
VikashGohil31-May-10 7:34 
AnswerRe: Run Web Application Under Evaluation Period. Pin
Brij31-May-10 9:38
mentorBrij31-May-10 9:38 
GeneralRe: Run Web Application Under Evaluation Period. Pin
VikashGohil31-May-10 20:10
VikashGohil31-May-10 20:10 

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.