|
use a compare validator to validate two dates.
add one comparevalidator
on properties select controltocompare,controltovalidate and value to compare. give value as >, < and change the type property into date
this wil fulfil ur requirement, if any error let me know
coolsweety
|
|
|
|
|
I think you would also want to check that valid dates have been entered. Does this help?
<% @Page Language="C#" %>
<html>
<head>
<title>Validating Dates</title>
</head>
<body>
<form runat="server">
Start: <asp:TextBox id="txtStartDate" runat="server" />
<br />
End: <asp:TextBox id="txtEndDate" runat="server" />
<br />
<asp:CompareValidator id="valid1" runat="server"
ControlToValidate="txtStartDate"
Type="Date"
Operator="DataTypeCheck"
Text="The start date must be a valid date."
/>
<asp:CompareValidator id="valid2" runat="server"
ControlToValidate="txtEndDate"
Type="Date"
Operator="DataTypeCheck"
Text="The end date must be a valid date."
/>
<asp:CompareValidator id="valid3" runat="server"
ControlToValidate="txtStartDate"
ControlToCompare = "txtEndDate"
Type="Date"
Operator="LessThanEqual"
Text="The start date must be less than
or equal to the end date"
/>
<br />
<br />
<asp:Button runat="server" text="Submit" />
</form>
</body>
</html>
|
|
|
|
|
what is the namespace and method name for it?
thx thx
|
|
|
|
|
It's client-side javascript - window.open()
|
|
|
|
|
Or simply a link with target="_blank".
---
b { font-weight: normal; }
|
|
|
|
|
Good point!
|
|
|
|
|
How to deploy a web application to another system
The system have only IIS
So we want to add .Net Framework and the Application at the time of installation
My application also have some resource files(.resx) and one dll
Thanks,
I am not ask about the copy and paste the proj
For eg, If we installing any software to our system to additional with that do u want to instal this software, like that
if we installing the application the .net frame work also have to be install with this package (.net framework is nearly <25 MB only)
Also u told dont have the resx files if we didnt put the resx files the localization cannot be taken place
Regards,
Febin
-
|
|
|
|
|
chakkara2003 wrote: no need of installing the .net frame work in the production mechine
Of course you need the .NET framework to deploy a .NET web app
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I have a listbox bound to a database server
I want that listbox to be updated when i press a button, whats the method to force a update?
Also
how do i open a new Browswer window in c#?
-- modified at 23:35 Wednesday 26th April, 2006
|
|
|
|
|
How do you bind data to the ListBox control? If you manage with your code instead of using a datasource control, then in the button click's handler you simply bind the updated data source to the ListBox to refresh the control.
|
|
|
|
|
How do i insert a variable into:
<%@ Register TagPrefix="Site" TagName="content" Src="header.ascx" %>
So that the value of src=variable.
|
|
|
|
|
I'm not sure you can.
As an alternative, you could have a user control that looks at an AppSetting in your web.config file and loads the desired user control; the "header.ascx" would be sort of a master control that loads the appropriate "xxx.ascx" file.
|
|
|
|
|
Just to flesh out my earlier suggestion with a sample - here would be a web form dynamicHeader.aspx , using the custom control -
<%@ Page Language="C#" %>
<%@ Register TagPrefix="site" TagName="content" Src="dynamicHeader.ascx" %>
<html>
<head>
<title></title>
</head>
<body>
<form runat="server">
<site:content runat="server" />
<p>
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
blah blah blah blah blah blah blah
</p>
</form>
</body>
</html> Then this could be the definition of dynamicHeader.ascx :
<%@ Control Language="C#" %>
<%@ Import Namespace="System.Web.Configuration" %>
<script runat="server">
void Page_Load()
{
string controlToLoad
= WebConfigurationManager.AppSettings["HeaderControl"];
Control uc = LoadControl(controlToLoad);
PlaceHolder1.Controls.Add(uc);
}
</script>
<asp:PlaceHolder id="PlaceHolder1" runat="server" /> Here are two user controls then, header1.ascx and header2.ascx :
<%@ Control Language="C#" %>
<h3>This is Header1.ascx</h3>
<asp:TextBox runat="server" />
<asp:Button runat="server" text="Search" />
<hr />
<%@ Control Language="C#" %>
<h3>This is Header2.ascx</h3>
<asp:Calendar runat="server" />
<hr /> And finally, you could then add either "header1.ascx" or "header2.ascx" in your web.config file:
<configuration>
<appSettings>
<add key="HeaderControl" value="header2.ascx" />
</appSettings>
</configuration> Does this help?
|
|
|
|
|
Greetings!
Need help on a service requisition system concept using asp.net and ado.net with monitoring (ip, network location, etc.) and tracking.
Thanx!
|
|
|
|
|
Sure - if it were me, I'd start here[^], with specific attention to #2.
|
|
|
|
|
can anyone give me the asp.net source code for inventory management system...
thanx in advance.
|
|
|
|
|
Do you really expect someone to sit down and program a complete system like that and hand it to you for free? And without any specification at all?
That's what your question sound like. If that was not your intension, you should ask a different question.
---
b { font-weight: normal; }
|
|
|
|
|
hello to all. I want to open a crystal report in PDF in new window. but when i click on the button, it opens in the same window. I can't use target=_blank over here, because i am writing code for generating the report in the button's handler, (or can i?) please help me in this matter.
|
|
|
|
|
There two options come to mind:
+ After you create the pdf report in the button click's handler, you can persist the document on the server side, then open the new page pointing to the pdf document.
+ Move your code to generate the pdf report to the page opened in the new window.
|
|
|
|
|
can you be more specific for first option? the code i am writing is as follows:
Dim report As New Doctormaster
Dim ms As System.IO.MemoryStream
ms = CType(report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
Response.ClearHeaders()
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Try
Response.BinaryWrite(ms.ToArray)
Response.End()
Catch err As Exception
Response.Write("< BR >")
Response.Write(err.Message.ToString)
End Try
|
|
|
|
|
Jmshastri wrote: ms = CType(report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
Response.ClearHeaders()
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Try
Response.BinaryWrite(ms.ToArray)
Response.End()
I mean once you have the report in the ms object, you can save this stream to file on the server side instead of writing it out to the output stream of the Response object. And what you might need to do next is to emit the client side script to open the new window with a link pointing to the saved file.
|
|
|
|
|
The following is code to open a new window from code behind. Put this in the event handler for button click.
Dim strPop As String = "" & vbCrLf _
& "window.open('crystalreports.aspx','Report');" & vbCrLf _
& "" & vbCrLf
Page.RegisterStartupScript("Pop", strPop)
-
बुरा जो देखण मै चला, बुरा न िमलया कोय,
जो मन खोजा आपणा तो मुझसे बुरा न कोय।
Translation
|
|
|
|
|
I m new to .net, i wann to know what exact session and how i can expire a session(forced expire,if i press back button and that old session should expire ) what should i do please tell any answer
vijaynathan
|
|
|
|
|
|
I have been asked to refine out corporate intranet (Asp.net with C# codebehind) and they have asked for more charts and visual components.
My question is "Is Dundas and DotNetCharting the only tools out there for this?" DotNetCharting is the less expensive of the two. But I wanted to check all my options before I commited to one.
Thanks
|
|
|
|