?
Solved

getting a parameter from the url

Posted on 2013-01-23
4
Medium Priority
?
316 Views
Last Modified: 2013-01-23
I am trying to get the value of the parameter in the url so I can pass it to my sql statement located in my aspx page- does anyone know how to do that
<asp:SqlDataSource runat="server" ID="UserDD" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                               SelectCommand=" Select useruid, FirstNm + '' + LastNm as username from PLMUser where useractive = 1 AND UserUID <> @mgruseruid And UserUID not in(select staffuseruid FROM PLMManagerStaff WHERE mgruseruid = @mgruseruid">
                <SelectParameters>
                    <asp:Parameter Name="mgruseruid" Type="Int32" DefaultValue=<%#Convert.ToInt32(Request["MID"])%>/>
                </SelectParameters>
    </asp:SqlDataSource>

Open in new window

0
Comment
Question by:r3nder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 38811770
Request.QueryString["MID"]
0
 
LVL 35

Expert Comment

by:YZlat
ID: 38811778
<SelectParameters>
      <asp:QueryStringParameter Name="mgruseruid" QueryStringField="MID" />
 </SelectParameters>
0
 
LVL 35

Accepted Solution

by:
YZlat earned 2000 total points
ID: 38811789
<asp:SqlDataSource runat="server" ID="UserDD" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                               SelectCommand=" Select useruid, FirstNm + '' + LastNm as username from PLMUser where useractive = 1 AND UserUID <> @mgruseruid And UserUID not in(select staffuseruid FROM PLMManagerStaff WHERE mgruseruid = @mgruseruid">
                <SelectParameters>
                    <asp:QueryStringParameter Name="mgruseruid" QueryStringField="MID" />

                </SelectParameters>
    </asp:SqlDataSource> 

Open in new window

0
 
LVL 6

Author Closing Comment

by:r3nder
ID: 38811864
Thank you YZlat
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Six Sigma Control Plans
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question