Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8085477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:07:49+00:00 2026-06-05T18:07:49+00:00

okay i have been trying to understand this for hours i am learning VB

  • 0

okay i have been trying to understand this for hours i am learning VB :

if i have this ( PageLoadComplete function / HiddenField / linkButton ) :

 Protected Sub PageLoadComplete(sender As Object, e As System.EventArgs) Handles     Me.LoadComplete
    If Request.QueryString("viewPDF") = 1 Then
        MsgBox(myfield.Value)
    End If
End Sub

this link open a new tab linked to the same page (it loads the same page ) :

   <asp:LinkButton runat="server" CssClass="lnkBtn" ID="btnViewPDF" 
 OnClientClick="var url = 'CIP_frmCIPEventExplore.aspx?ViewPDF=1;
  parent.showNewTab(url, 'CIP Chart - PDF', 'CIP');">
  <img alt=""src="External_Files/images/view_pdf_icon.png" />
   <span>View MsgBox</span></asp:LinkButton>

and hidden field that has a value :

<asp:HiddenField ID="myfield" runat="server" Value="myfields" />

IF i click on the link it open a new tab with a MsgBox that has the HiddenField (ID=”myfield”) value which is very fine but :

if i modify this hidden field and remove it’s value like this :

   <asp:HiddenField ID="myfield2" runat="server" />

and then add this value using javascript:

   $("#<%=btnViewPDF.ClientID%>").click(function(){
               $("#<%=myfield2.ClientID%>").val('this is the field2 val') ; ) ; 
            });

i get an empty MsgBox() , so how can i make the jquery update this hidden field ID=”myfield2″ before calling the PageLoadComplete function
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:07:51+00:00Added an answer on June 5, 2026 at 6:07 pm

    Well, you have two click events defined for btnViewPDF, so they are likely conflicting with each other. Try moving the Javascript from the OnClientClick property into the jQuery click() function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I been trying to work this out but unable too. I have a
Okay. Now I give up. I have been playing with this for hours. I
Okay I have been working on this for about 2 hours and am sure
Okay I have been trying to get this to work for some time now.
Okay I've been trying to figure this out for a while now. I have
Okay so basically, i have been trying this for and hour or 2 now.
Okay, I've been trying to get this for almost 4 hours now, and it
Okay, guys i have been trying to define a Stack , each node also
Okay so I have been trying to get into IoC lately. However, I keep
Newbie still learning, been trying to search and hack code together for hours now,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.