Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Unable to get the values from a text box during updateUnable to get the values from a text box during update
Previous
 
Next
New Post
7/25/2007 12:11 PM
 

ascx:

<%

@ Control Language="C#" AutoEventWireup="true" CodeFile="EditBankerDetails.ascx.cs"

 

Inherits="SWB.Modules.SWBMasterData.DesktopModules_SWBMasterData_EditBankerDetails" %>

<div id="tabPersonal" class="divcontentinner">
 <table cellspacing="5" class="tablerow">
 <tr id="TR_FIRSTNAME">
 <td>
  <asp:Label runat="server"  ID="lblFIRSTNAME" Text="First Name:" />
 </td>
 <td >
     <asp:TextBox runat="server" ID="txtFIRSTNAME" CssClass="textbox" />
 </td>
 </tr>
 </table>
</div>

 

codebehind:
namespace SWB.Modules.SWBMasterData
{
    public partial class DesktopModules_SWBMasterData_EditBankerDetails : PortalModuleBase
    {

        #region Private Members
        protected int id = -1;
        protected string languageUI = "";
        ObjBankerForm gui = new ObjBankerForm();
        #endregion

        protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    string homeURL = DotNetNuke.Common.Globals.NavigateURL();
                    string updateValue = "<script>";
                    updateValue += "function goToHome(){window.location.href =\'" + homeURL + "\';}";
                    updateValue += "</script>";
                    if (!Page.ClientScript.IsClientScriptBlockRegistered("UpdateValue"))
                        Page.ClientScript.RegisterClientScriptBlock(GetType(), "UpdateValue", updateValue);

                    //register the client scripts
                    if (!Page.ClientScript.IsClientScriptBlockRegistered("masterdata.js"))
                        Page.ClientScript.RegisterClientScriptInclude(GetType(), "masterdata.js", ModulePath + "Resources/masterdata.js");
                }
               
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }

        protected void btnSave_Click(object sender, System.EventArgs e)
        {
        Banker banker = new Banker();
        GetFieldValues(banker);
        ObjBankerForm gui = new ObjBankerForm();
        gui.updateBanker;
        }
       
        protected void GetFieldValues(Banker banker)
        {
          
            banker.FirstName = txtFIRSTNAME.Text;
            banker.LastName = txtLASTNAME.Text;
        }
  }
  }

 
New Post
7/26/2007 10:13 AM
 

What error message are you getting?

In your above code your method "GetFieldValuess" you would need to pass the banker object by reference to have access to the values after they are changed later in your code.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
7/26/2007 11:09 AM
 

thanks for answering, actually the problem was with the "AutoEventWireUp" . I set it to true and was doing page overload etc. Now I have solved it. thanks

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Unable to get the values from a text box during updateUnable to get the values from a text box during update


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out