I have the following in place. Is this sufficient code for windows authentication and AD roles? Is the code in the right event (page_load) or should it be somewhere else?
Right now I get the statement on the top of the screen, you do not have access, and the default page loads. I'm not in the...
I've resolved the issue. I've removed the page_load, dropdownlist logic and added a selectcommand under the sqldatasource, to do the filtering there. It works now.
Here is my Gridview code. In addition to gridview I have 2 dropdownlists and the filtering logic is on the page_load event one the code behind (VB).
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" BackColor="White"...
When I hard code the values into the updatecommand then the gridview gets updated, but if I just have the parameters the gridview does not get updated. What could the issue be?
This updates the grid:
UpdateCommand="Update atable set [afield]='test', [bfield]='test' where [id]=@id"
This...
Here is my sqldatasource info (I noticed it didn't post properly the first time):
SelectCommand="SELECT * FROM [datatable] WHERE ([afield] = @afield) OR ([bfield] = @bfield) ">
SelectParameters
ControlParameter ControlID="DropDownList1" Name="afield" PropertyName="SelectedValue"...
Thank you, you are correct and that is my plan to move to sp's however what I am encountering is a filtering issue and would need assistance with that.
I have two drop down lists to use as a filter for a gridview. This is what the select command in the gridview's datasource looks like:
SelectCommand="SELECT * FROM [datatable] WHERE ([afield] = @afield) OR ([bfield] = @bfield) ">
<selectparameters>
Type="String" />
Type="String" />...
I've added that but it didn't make a difference. This is what I had:
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
If DropDownList1.SelectedIndex.Equals(0) Then
tabledata.SelectCommand = ("SELECT...
I have a drop down list with gridview. When the page loads the option in the drop down is 'select an item'. However the gridview does not load all records when the page is first loaded and the user has not made a selection yet in the drop down. Here is my code:
<asp:dropdownlist...
Thanks for your help. This is also a good solution to my problem:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.changepassword.changingpassword(VS.80).aspx
I am using the ChangePassword Control and would like to know if I can override the ChangePassword class/method. I have my own logic in C# that I would like to use when the user clicks the Change Password button of this control .
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.