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.0Before Update my textbox gets resetsBefore Update my textbox gets resets
Previous
 
Next
New Post
4/18/2008 5:26 AM
 

 Hi,

I've got made some changes in user.ascx and user.ascx.vb to create 2 extra field to create a relation in a new table between the dnn UserId and the intern customer or employee id.

I've got the add and delete function working perfectly.

Only when i'm try to update it the change is reset before the update statements runs.

in the User.axcx i've created a extra asp:panel

 

 

asp:panel id="pnlAddRelation" runat="server" Visible="True">

<table id="tblUserType" runat="server" width="350">

<tr height="25">

<td width="133" class="subhead"><dnn:label id="plUserType" runat="server" controlname="chkTypeUser" /></td>

<td width="175" class="normalTextBox"><asp:DropDownList id="chkTypeUser" runat="server" Enabled="false"/>

<asp:Image ID="Image1" ImageUrl="~/images/required.gif" BorderStyle="None" runat="server"/></td>

</tr><tr>

<td width="133" class ="subhead">

<asp:label ID="valUserType" runat="Server" CssClass="NormalRed" />

</td > 

</tr >

<tr height ="25"> <td width="133" class="subhead"><dnn:label id="plUserID" runat="server" controlname="txtUserID"/></td > <td width="175"><asp:TextBox id="txtUserID" runat="server" CssClass="NormalTextBox" size="20" maxlength="20"></asp:TextBox > <asp:Image ID="Image2" ImageUrl="~/images/required.gif" BorderStyle="None" runat="server"/></td > </tr > <tr > <td width="133" class ="subhead"> <asp:label ID="valUserID" runat="Server" CssClass="NormalRed" /> </td > </tr > </table >

 asp:panel>

In the user.ascx.vb i've edit in the DataBind()

Dim UserRelID As Integer = UserController.GetUserRelID(User.UserID)Dim ingesteld As Boolean If chkTypeUser.Items.Count = 0 Then

chkTypeUser.Items.Add(

chkTypeUser.Items.Add(

chkTypeUser.Items.Add(

"")"Medewerker")"Klant/Leverancier")End If If Not ingesteld Then If UserRelID < 0 Then

UserRelID = UserRelID * -1

chkTypeUser.Items(1).Selected =

True

txtUserID.Text = UserRelID

 

ElseIf UserRelID > 0 Then

chkTypeUser.Items(2).Selected =

True

txtUserID.Text = UserRelID

End If

ingesteld =

True End If

When i leave the if not ingesteld statement i can update so the rest is working. Only when this statement is standing there the data is read out the db but when i'm change it and click on update it gets resets before its get writing in the db.

I'm really confised and can't  find where the data gets reset. Can anyone help me?

 

 
New Post
4/18/2008 8:30 AM
 

I've found the problem placed it in a If Not Page.IsPostBack and it worked :)

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Before Update my textbox gets resetsBefore Update my textbox gets resets


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