Forum Discussion

kemppaik's avatar
kemppaik
Copper Contributor
Mar 30, 2023

Unable to get text value from user prompt

I hope someone can help point me in the right direction.  I'm a newbie and have inherited a legacy application and no other employees can help me with this one.

 

I have an asp.net application that has a Copy button.  When the copy button is pressed, a screen pops-up and users can enter a value to indicate what they want to copy to.  However, the copy does not work.  I can not seem to get the text that the user enters to be picked up in the code so the copy can work.  

 

Why am I unable to get the code to pick up the text that is entered by the user?  I have attached the files and a screenshot showing the copy button feature.  

 

I'd appreciate any guidance/help on this.  As mentioned, I'm a newbie when it comes to this.

 

Thanks.

 

5 Replies

  • LanHuang's avatar
    LanHuang
    Former Employee

    Hi kemppaik,

    Thanks for posting your issue here.

    However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
    Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
    Best Regards,
    Lan Huang

  • jhallal's avatar
    jhallal
    Copper Contributor

    kemppaik 

    it's difficult to pinpoint the exact issue without looking at the entire code. However, here are a few things you can try to troubleshoot the problem:

    1. Check if the text entered by the user is being captured correctly in the code. You can do this by placing a breakpoint in the code where the text should be captured and checking the value of the variable that stores the user input.

    2. Ensure that the input field has the correct name attribute. The name attribute is what allows the server-side code to access the value of the input field.

    3. Check if there are any JavaScript errors on the page that might be preventing the input value from being sent to the server. You can do this by opening the browser console and looking for any error messages.

    4. Check if there are any server-side validation errors that might be preventing the copy operation from working. You can do this by checking the server logs or adding debug statements in the code to see where the process is failing.

    • kemppaik's avatar
      kemppaik
      Copper Contributor
      Thanks jhallal. I know that the text entered by the user is not being captured correctly in the code. This is visible in one of my screenshots in the attached document. The salesOrderNumber is coming through as "General" instead of "1234567890".
      • jhallal's avatar
        jhallal
        Copper Contributor
        kemppaik, can you confirm that the asp.net button copyButton is inside the <asp:UpdatePanel>. It seems the issue is related to the way the ajax panel is used.

Resources