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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:01:01+00:00 2026-05-17T17:01:01+00:00

Consider a page, when the page loads, nothing shows up. It works when i

  • 0

Consider a page, when the page loads, nothing shows up.

It works when i pass the querystring on the browser as this:

http://localhost:51765/foo/foo.aspx?ID=c516f4f4-36a9-40a7-baad-d2419ea631b9

I want it to work when the page load not when i pass the querystring on the browser.

Can someone help me with this?

<asp:SqlDataSource ID="categoriesDataSource" runat="server" 
     connectionString="<%$ ConnectionStrings:ConnectionString %>"
     SelectCommand="SELECT [CategoryID], [Name] FROM [Categories] WHERE ([UserId] = @UserId) ORDER BY [Name]">
     <SelectParameters>
          <asp:QueryStringParameter Name="UserId" QueryStringField="ID" />
     </SelectParameters>
</asp:SqlDataSource>

<asp:DropDownList ID="categories" runat="server" AutoPostBack="True"
       DataSourceID="categoriesDataSource" DataTextField="Name" 
         AppendDataBoundItems="True" DataValueField="CategoryID">
        <asp:ListItem  Value="">-- All Albums --</asp:ListItem>
</asp:DropDownList>

 <asp:SqlDataSource ID="picturesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
      SelectCommand="SELECT [PictureID], [Title], [UploadedOn] FROM [Pictures] WHERE UserId = @UserId AND 
       (CategoryID = @CategoryID Or @CategoryID IS NULL) ORDER BY UploadedOn DESC" 
        CancelSelectOnNullParameter="False">
  <SelectParameters>
      <asp:ControlParameter ControlID="categories" Name="CategoryID" PropertyName="SelectedValue"/>
      <asp:QueryStringParameter Name="UserId" QueryStringField="ID" />
  </SelectParameters>
</asp:SqlDataSource> 


<asp:GridView ID="GridView1" runat="server" DataSourceID="picturesDataSource">
</asp:GridView>
  • 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-17T17:01:01+00:00Added an answer on May 17, 2026 at 5:01 pm

    It is difficult to answer your question without showing the code of the page or at least explaining what it does. From the url it seems that the page relies on the ID parameter and tries to parse it to a Guid. You need to test whether the ID parameter is passed and use it only in this case:

    string id = Request["ID"];
    if (!string.IsNullOrEmpty(id))
    {
        // The ID parameter has been passed => use its value here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this page @ http://www.bloodbone.ws/screwed.html I need to be able to have the a.grow
Consider this abstract class public abstract class Foo { public Injectable Prop {get;set;} }
Consider this scenario: <asp:CheckBoxList> in a master page. the goal is to have all
Consider a hiddenfield in the page HfId <input type=hidden id=HfId/> How to assign,clear and
I hava a HTML page on server. consider an article example is loaded in
Consider the following markup: <!DOCTYPE html> <html> <head> <title>Test Page</title> <link href=screen.css rel=stylesheet />
Consider the following URL: http://www.iamsomeweiredurl.fromsomewhere/andIwant#thisfragment Is there a chance to get thisfragment by @RequestMapping
This page introduces a lot of clojure libraries. And this page also comments to
consider this code. when button is clicked 'active' class is added to this, and
Consider a HTML page with a bunch of tags each with their own content.

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.