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 5993069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:37:21+00:00 2026-05-22T23:37:21+00:00

I am using this line to load the .ascx control after running a few

  • 0

I am using this line to load the .ascx control after running a few javascript statements

         __doPostBack('<%=Basket1.ClientID %>', null)

I do this then i get to the .ascx.cs file i run the code good..but can i pass parameter using the above line , and if i can how can i retrieve them on the ascx.cs page . I want to do it because even if i refresh the page the .ascx control loads and some code i dont want is executed so i need some check that when it is called from javascript it has some values and run the code . I hope you get what i want to say

Thank you

  • 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-05-22T23:37:22+00:00Added an answer on May 22, 2026 at 11:37 pm

    Ask yourself this: If I look at the flow (not the code, but the business flow), what information do I have when I am running the code one way that I don’t when I run it another. If you figure that out, it is what has to be passed to the ASCX control.

    Then there is the question of when you have to do it. The load of this variable has to be loaded prior to rendering the control.

    ASCX controls are classes, like any other item in .NET, so setting it up as a property is fairly easy. If you head to a constructor argument, you end up with a dynamic loading issue, so I would not peruse that direction.

    This page shows user controls with properties, which is an easy way to accomplish what you desire. To be safe, set a default for the property or choose to render an “error” (user friendly) when the property is not set.
    http://oreilly.com/catalog/progaspdotnet/chapter/ch14.html

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

Sidebar

Related Questions

I load content to the using AJAX. in content you can find this line
I’m using this javascript code to animate and load my website! $('.down-trigger').on('click', function ()
I need help collapsing a collapsible div on page load. I'm using this JavaScript
I am using this line to obtain and save an image from a URL.
I'm using this line to get the beginning time of the first day of
I have a .mbm file that I copy to my device using this line
I'm trying to show a 24 hours format using this line: Text='<%# Bind(Appointment, {HH:mm})
I want to use this line of code: using (ADataContext _dc = new ADataContext(ConnectionString),
I'm using GDOME.pm and in my script I have this line: my $doc =
I've referenced System.Xml: using System.Xml; Then in this line: XmlDocument xdoc = new XmlDocument();

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.