|
A partial class is just a class that is split into separate parts.
public partial class A {
... some code
}
public partial class A {
... some more code
}
is the same as:
public class A {
... some code
... some more code
}
The auto generated code is the code that is automatically created to interface with the server controls in the page.
For example, if you have a Label named InfoLabel in the page, a reference is created for it:
public protected Label InfoLabel;
---
b { font-weight: normal; }
|
|
|
|
|
Hey Folks,
I have been having some difficulties implementing the ChangePassword control to use the ActiveDirectoryMemembershipProvider. Any help or incite that you can provide would be most appreciated! Thanks in advance.
From within our webapp, despite the strength of the password used, when the ChangePassword control calls ActiveDirectoryMemembershipProvider.ChangePassword() function, a MembershipProviderException is thrown with the following description:
"The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements. (Exception from HRESULT: 0x800708C5)"
However, the password policy for AD users is set as follows:
1) Enforce password history = 0 passwords remembered
2) Maximum password age = 0
3) Minimum password age = 0 days
4) Minimum password length = 8 characters
5) Password must meet complexity requirements = disabled
6) Store passwords using reversible encryption = disabled
(The AD server was rebooted)
Here are the configuration of the membership provider in the web.config:
<membership defaultprovider="MyADMembershipProvider">
<providers>
<add connectionstringname="ADConnectionString"
="" connectionusername="dev\administrator" connectionpassword="Password!" enablesearchmethods="true" name="MyADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionprotection="Secure" enablepasswordreset="true" requiresquestionandanswer="true" requiresuniqueemail="false" maxinvalidpasswordattempts="1000" minrequiredpasswordlength="8" minrequirednonalphanumericcharacters="0" passwordstrengthregularexpression=".*" attributemapusername="sAMAccountName" attributemappasswordquestion="UserPasswordQuestion" attributemappasswordanswer="UserPasswordAnswer" attributemapfailedpasswordanswercount="UserFailedPasswordAnswerCount" attributemapfailedpasswordanswertime="UserFailedPasswordAnswerTime" attributemapfailedpasswordanswerlockouttime="UserFailedPasswordAnswerLockoutTime">
As you can tell from the password policy and the web.config, we have opened this wide up. The strange thing is that we are using the AD Membership provider and ChangePassword control right out-of-the-box, with literally no customization at all, so we are at a bit of a loss here.
Has anyone else successfully implemented this? Any thoughts?
╔╗
╠╣MSTERDAMM
║╚"Half our life is spent trying to find something to do with the time we have rushed through life trying to save." -- Will Rogers
╝
|
|
|
|
|
How can i achieve this?
I want to get the MAC Address of the user Network Card. What are my options?
Does IE have an function for this ?
Is it possible through scripting ?
Will it work through a ActiveX Control ?
Thanks in advanced
|
|
|
|
|
I doubt IE would have the necessary security priviledges - my guess would be an ActiveX would be the only way, unless the web server's variables can help?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
After some more research i did, i think it is the only way to go.
|
|
|
|
|
You can try to do this from an ActiveX control. I would think that the only (legit) reason to do this is for some kind of security. You might want to use a username/password combination instead. Then allow a single user per username.
|
|
|
|
|
I want to restrict the application to specific computers.
With a username and password the user can use it anywhere !?
|
|
|
|
|
Why not get their IP addresses? You may need to create a range of valid IP addresses from the host providers for dynamic IPs. If someone logs in with their username/password, you validate that they are using a valid IP address. It won't completely fix your issue, but it may minimize the visiblilty.
|
|
|
|
|
I have this 'little' problem and can't find the correct answer. The situation is:
I have a asp.net form with 2 buttons (update and delete). When i press the update-button, i'm calling a javascript-function in my aspx wich presents a confirmationbox. After pressing 'OK' i do a doc.submit wich returns to my server-code. I check if it's a postback and want to know wich button (update or delete) i pressed. Now that's exactly the problem, i can't. When i return to the server-side i don't know wich button started the action so i don't know if i ought to update or to delete. I read something about Request.Params("__EVENTTARGET") but can't get this to work. Please help me out, either clean of with a dirty workaround.
Mark Mestrom
Webdeveloper at qualcomm
|
|
|
|
|
In java script function set click value in session variable or in cookies and then check on post back.
after every check clean the session or cookies for next time check.
according to your logic.
Parwej Ahamad
|
|
|
|
|
Hi,
I have 3 tables: table1, table2 and table3.
Table 1 (table1ID, Name1)
Table 2 (table2ID, table1ID, Name2)
Table 3 (table3ID, table2ID, Name3)
I have 2 DropDownLists: ddltable1SEARCH and ddltable2SEARCH.
They are both databound with the fields table1.Name1 and table2.Name2 respectively.
I also have a Datagrid: table3grid.
It is databound with the field table3.Name3.
NOTE: Please keep in mind the table relationships. My point is:
I CANNOT directly perform a search using the first dropdown. DropDown2 relies on DropDown1. When DropDown1 changes, DropDown2 changes to display available entries. THEN, the search is directly done by using DropDown2 for the Datagrid.
I have already created the view for the tables.
Therefore, I would like to know which of the following VB statements is syntatically correct when I am passing the search values from the DropDowns to a SubRoutine:
obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
OR
obj.SearchSubRoutine(Me.ddltable1SEARCH.SelectedValue And Me.ddltable2SEARCH.SelectedValue)
|
|
|
|
|
As per the Table Relationships, Table3 refers only Table2 and Table2 refers Table1.
And you are refreshing the ddltable2SEARCH list whenever ddltable1SEARCH selection changes.
So, you don't need to consider both dropdown values to fill the datagrid.
I would prefer : obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)
Ravi Gopal.
|
|
|
|
|
Thanks for the reply, I will try to see if I can make that work. Have been trying for a while with no effect.
Cheers.
|
|
|
|
|
Hi All,
How can i mask a particular javascript function when an event occurs.
That particular javascript function should work well for all other events.
|
|
|
|
|
How to change the List Item of Dropdown list via coding.
For Examle I have list item Enable, How will I change that to disable via Coding from an event handler
|
|
|
|
|
If you are just having one item in the dropdown list the you can clear it and then add the new item. Otherwise you have to rebind the dropdown list with the new datasource.
Best Regards,
Apurva Kaushal
|
|
|
|
|
is there a way to have a server automatically
send out an email on a certain date. For example, if it was someones birthday,
an email saying happy birthday would automatically be sent out.
Using : ASP.Net
Dileep.M
|
|
|
|
|
Write a simple aspx page that will send a email to all users that have a birthday (based on current date).
And then set-up a shcedulle task that will run your script every day.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi
I think you must use Windows Service for this task. You must questioning DB by timer. And the end you receive simple "Scheduled".
|
|
|
|
|
How can I get click event in TextField...
Thanks
Kamal
|
|
|
|
|
What do u mean by click event .
If u want that event on on text change then
<asp:textbox id="TextBox1" runat="server" ontextchanged="EventName">
|
|
|
|
|
Use can use onfocus event. on key up ,keydown,keypressed etc.
Dileep.M
|
|
|
|
|
Hi
For textbox only we have onfocus,Keypress and textchanged events
No click event for textbox.
Thanks
monika
|
|
|
|
|
write below code in page init section
Private Sub Page_Init(........)
Me.TextBox1.Attributes.Add("onClick", "alert('Hello')")
i suggest you to check other threads also. it may help a lot. This question is solved by Parwej Ahmed yesterday.
Regards,
DJ Rock
|
|
|
|
|
hi there....
This is the code defaultly i'm having in sample.aspx file..[ html view ],
<%@ Page language="c#" Codebehind="sample.aspx.cs" AutoEventWireup="false" Inherits="Demo.sample" %>
I converted this sample.aspx.cs file into sample.dll file successfully. Now how should i write(include) the page directory in sample.aspx file, and what are the steps to upload this sample.dll file in remote server..
Please Help me...
Regards n Thks
Sam.M
|
|
|
|