Click here to Skip to main content
15,901,205 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: User Controls disappear on PostBack Pin
Member 106878536-Dec-14 20:13
Member 106878536-Dec-14 20:13 
QuestionI am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 10:37
samflex4-Dec-14 10:37 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
ZurdoDev4-Dec-14 10:44
professionalZurdoDev4-Dec-14 10:44 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 11:05
samflex4-Dec-14 11:05 
QuestionRe: I am still struggling to find a fix for this. Can some guru please help? Pin
ZurdoDev4-Dec-14 14:14
professionalZurdoDev4-Dec-14 14:14 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
onelopez4-Dec-14 11:18
onelopez4-Dec-14 11:18 
AnswerRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx4-Dec-14 13:04
professionaljkirkerx4-Dec-14 13:04 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex4-Dec-14 16:44
samflex4-Dec-14 16:44 
Thank you guys, all of you for your kindness with your responses.

Ryan, I should have been more much clearer. When I said it doesn't work, I meant that yes, it will display results in labels but I could not pass the value of the results to codebehind.

Second, I can't pass that value from one multiview to another.

Here are some examples:

PHP
//HTML
          <asp:MultiView ID="myMultiView" ActiveViewIndex="0" runat="server">
           <asp:View ID="vwPersonalData" runat="server">

            <p>
                <asp:TextBox ID="address1" runat="server" Text="Marietta, GA" ClientIDMode="Static"></asp:TextBox>
                <asp:TextBox ID="address2" runat="server" Text="Birmingham, AL" ClientIDMode="Static"></asp:TextBox>
            </p>
 <%--           <asp:Label ID="Label1" Style="display: none" runat="server" Text=""></asp:Label>--%>
             <asp:Label ID="results" runat="server" Text="" Style="display: none" ClientIDMode="Static"></asp:Label>
             <asp:HiddenField runat="server" ID="result" />
            </asp:View>
         <asp:View ID="vwPreview" runat="server">
        <br />
       <!-- Labels to preview input here -->
      <span style="font-weight:bold;font-size:medium;">Please verify your order:</span><span style="color:Red;font-weight:bold;">      10% discount applied</span>
      <br /> <br />
 <table>
 <tr>
  <td>Estimated Total Miles:</td>
  <td><asp:Label ID="lblMiles" runat="server" /></td>
</tr>
<table>
 </asp:View>
</asp:MultiView>
 <asp:Button ID="btnBack" runat="server" Text="< Back " OnClick="btnBack_Click" />
  <asp:Button ID="btnNext" runat="server" Text="Next >" OnClientClick="showLocation();" OnClick="btnNext_Click" />	
  <asp:Button ID="btnSend" runat="server" Text="Send request" OnClick="btnSend_Click" />
</form>


//codebehind
        Dim Hiddenresult As HiddenField = form1.FindControl("result")
        lblMiles.Text = Hiddenresult.Value


As you can see from the sample codes, I am trying to get the value of Hidden field called results and pass that value to preview multiview page called vwPreview but it always comes up blank.

What am I doing wrong?
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 7:58
professionaljkirkerx5-Dec-14 7:58 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 8:54
samflex5-Dec-14 8:54 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 11:41
professionaljkirkerx5-Dec-14 11:41 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 13:35
samflex5-Dec-14 13:35 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 13:47
professionaljkirkerx5-Dec-14 13:47 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 14:23
samflex5-Dec-14 14:23 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 16:37
professionaljkirkerx5-Dec-14 16:37 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex5-Dec-14 17:52
samflex5-Dec-14 17:52 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx5-Dec-14 18:11
professionaljkirkerx5-Dec-14 18:11 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
samflex6-Dec-14 3:47
samflex6-Dec-14 3:47 
GeneralRe: I am still struggling to find a fix for this. Can some guru please help? Pin
jkirkerx6-Dec-14 7:53
professionaljkirkerx6-Dec-14 7:53 
GeneralWorking copy of your code. Pin
jkirkerx6-Dec-14 9:00
professionaljkirkerx6-Dec-14 9:00 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 14:47
samflex6-Dec-14 14:47 
GeneralRe: Working copy of your code. Pin
samflex6-Dec-14 16:21
samflex6-Dec-14 16:21 
QuestionAsp.net page with Web Service WITHIN code behind being called Pin
StealthRT4-Dec-14 5:13
StealthRT4-Dec-14 5:13 
QuestionRe: Asp.net page with Web Service WITHIN code behind being called Pin
jkirkerx4-Dec-14 8:55
professionaljkirkerx4-Dec-14 8:55 
SuggestionRe: Asp.net page with Web Service WITHIN code behind being called Pin
ZurdoDev4-Dec-14 10:45
professionalZurdoDev4-Dec-14 10:45 

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.