u can use CompareValidator validation contol.
<asp:CompareValidator ID="valCompEndDate" runat="server" ControlToCompare="txtStartDate"
ControlToValidate="txtEndDate" Display="Dynamic" ErrorMessage="End Date should not be less than start date."
I have a web application in where in my default page cs file i didn"t write anything
and i have created an msi using set up and deployment provided by VS 2005 and installed that msi in other machine and when im trying access it thru url im getting the below error....
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Requested registry access is not allowed.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
There is no solution. Change your design. Why ASP.NET application requires registry access? Usually hosting providers will not give access to registry. If you have a dedicated server, you can impersonate the user before accessing registry. But it is nasty.
The below is my web.config... please have a look
Actually the below is web.config for AJAX ENabled ASP.net web application
It"s a plain application ie no code wa written in cs file...
Really im struggling frm 2 days please try to help me out...
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
<trust level="Full" originUrl="" processRequestInApplicationTrust="false"/>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<authenticationService enabled="true" requireSSL = "true|false"/>
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<scriptResourceHandler enableCompression="true" enableCaching="true" />
In windows 2003 server in IIs 6.0 when i tried to change the process account of the application pool to Local System through script(because i should not change manually and that(changing process account) should happen when installing MSI itself) it worked fine ie in IIS 6.0 but im strugling how should i change process acount to Local system in IIS 5.0 thru script....
Any way changing process account to Local System is not safe but i cannot
manually go to registry and add the ASPNET account and give read and write access....
And in IIS 5.0 ie in Windows Xp pro if i set Permissions for
HKLM\SYSTEM\CurrentControlSet\Control\Lsa Select this key and add ASPNET machine account with read and write permissions then im able to clear error Where LSA(local Security Authority)...
Hi all I want to create a very generic search control which i can use it on any page.so as to search the data from the table provided by user,list of columns and the sql will be dynamically created depending on textbox id and there respective values.
Please Suggest how do i create a server control so that i can use it on any page which will be either return dynamic sql or datasource for binding with gridview.
protected void Button1_Click(object sender, EventArgs e)
SqlConnection sconn = new SqlConnection();
sconn.ConnectionString = conn;
ArrayList ar = new ArrayList();
ArrayList ar1 = new ArrayList();
foreach (Control c in Panel1.Controls)
Type t = c.GetType();
string name = t.Name;
TextBox t1 = null;
id = c.ClientID;
t1 = (TextBox)c;
value = t1.Text;
value = "%";
bool lbHasWhere = false;
StringBuilder loBuffer = new StringBuilder();
loBuffer.Append("Select '"+columns+"' From '" + tablename+ "'");
for (int k = 0; k < ar.Count; k++)
loBuffer.Append(" And ");
loBuffer.Append(" Where ");
lbHasWhere = true;
loBuffer.Append("" + ar[k] + " like '" + ar1[k] + "'");
I have an click once application. The prerequisites which i have mentioned is .net Framework 2.0. If the prerequisite is not there, in publish.html, i get a button to download it, else the Run button will install the application (which is developed by me) . This works fine in all the machines, except for one in which i have the following versions of .NET Framework,
.NET Framework 3.0 Service Pack 2 3.2.30729
.NET Framework 3.5 SP1 3.5.30729
.NET Framework 2.0 Service Pack 2 2.2.30729
In this machine even though we have Framework 2.0 and higher versions, i am getting the button to download Framework. This is not correct. Can any one help me on how to overcome this problem.
the problem that in href link i must make a POST to the page not a GET. th problem that for style reason i must keep the <li><a></a></li> to keep the style in the page.
is that possible, is there any trick to do it?
thanks you for help!