|
jsript validation ( date validation )
Can anyone help me ,I want Jscript validation .Please help me with some
code & description.
dipendra
|
|
|
|
|
How about being a little more specific? What are you trying to do? What have you tried? If you haven't tried anything, then do so before asking for help.
only two letters away from being an asset
|
|
|
|
|
if u r using ASP.net, why dont u use the validation controls in it.. just drag and drop one..
for input date, use calendar extender in AJAX, and a reqd field validator on the text box.. this will easily do the job.
Kunal
|
|
|
|
|
I write this code in webpart.aspx and add this file to my project:
<div >
<asp:WebPartManager ID="WebPartManager1" runat="server">
</asp:WebPartManager>
<table runat ="server" >
<tr >
<td>
<asp:WebPartZone ID="WebPartZone5" runat ="server" >
<ZoneTemplate >
<asp:Calendar ID="Calendar1" runat="server" Title="Time & Date" BackColor="White" BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#003399" Height="200px" Width="220px">
<TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
<SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<OtherMonthDayStyle ForeColor="#999999" />
<TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True"
Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
<NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
<SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
<WeekendDayStyle BackColor="#CCCCFF" />
<DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
</asp:Calendar>
</ZoneTemplate>
</asp:WebPartZone></td> </div>
But this gives one problem at runtime i.e how to retain the webpart control, once closed by mistake? (at runtime).
I am not able to view the webpart once i closed it on runtime.
Another problem is that I am using vs2005 but I am not able to find webpartpagemenu control in web parts in toolbox
pls help
|
|
|
|
|
You need to add a catalog zone to your page. When switching the WebPartManager to catalog mode it will display and you can add any closed webparts back to the page.
There is no such thing as a webpartpagemenu control.
Do yourself a favor and do some research on the subject before trying to use it.
only two letters away from being an asset
|
|
|
|
|
Does anyone know if I can use Ajax with VS2003 & ASP.Net 1.1 ?
Thanks
|
|
|
|
|
AJAX is a programming technique, not a tool. It is independent of VS and ASP.NET and has been around for years.
only two letters away from being an asset
|
|
|
|
|
|
*This is my code
***********
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ds As New Data.DataSet
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Dim str As String = "select ProjectMember, Total_Hours from Timesheet"
Dim repeater1 As Repeater
Dim NumberOfBoxes As Integer
Dim WhichBox As Integer
NumberOfBoxes = Integer.Parse(WhichBox)
Dim rows(NumberOfBoxes) As Integer
For WhichBox = 0 To NumberOfBoxes
rows(WhichBox) = WhichBox
Next
repeater1.DataSource = rows
repeater1.DataBind()
Dim bLayer As New Businesslayer.GlobalFunctions
Dim reader As Data.SqlClient.SqlDataReader = bLayer.returnRecords(str)
For WhichBox = 0 To NumberOfBoxes
Dim cmbProjectName As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbProjectName"), DropDownList)
Dim cmbClientSite As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbClientSite"), DropDownList)
Dim cmbProjectManager As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbProjectManager"), DropDownList)
Dim cmbCategory As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbCategory"), DropDownList)
Dim cmbProjectMember As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbProjectMember"), DropDownList)
Dim cmbOccupation As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbOccupation"), DropDownList)
Next
Session("Repeater1") = reader("Repeater")
Session("ProjectMember") = reader("ProjectMember")
Session("TotalHours") = reader("TotalHours")
GridView1.DataSource = ds
GridView1.DataBind()
End Sub
***********
*This is an error
**********
Object reference not set to an instance of an object
*****************
*I want the gridview to display selected values from the table
****************
please help me what might be the problem
oga m
|
|
|
|
|
|
Go here to learn how to program with data in ASP.Net.
|
|
|
|
|
*This is a error
************
Object reference not set to an instance of an object.
*******************
*This is my code,when you click button to enter the captured values from the controls in to the Table
**************
otected Sub ButtonSubMana_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonSubMana.Click
Dim ds1 As New Data.DataSet
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Dim NumberOfBoxes As Integer
Dim WhichBox As Integer
NumberOfBoxes = Integer.Parse(txtDay.Text)
Dim rows(NumberOfBoxes) As Integer
For WhichBox = 0 To NumberOfBoxes
Dim txtDate As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDate"), TextBox)
Dim cmbProjectName As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectName"), DropDownList)
Dim cmbClientSite As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbClientSite"), DropDownList)
Dim cmbProjectManager As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectManager"), DropDownList)
Dim cmbProjectMember As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectMember"), DropDownList)
Dim cmbCategory As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbCategory"), DropDownList)
Dim cmbOccupation As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbOccupation"), DropDownList)
Dim txtHours As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtHours"), TextBox)
Dim CheckBox1 As CheckBox = CType(Repeater1.Items(WhichBox).FindControl("CheckBox1"), CheckBox)
Dim txtDescription As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDescription"), TextBox)
obj.addTimesheet(txtIDNumber.Text, cmbProjectName.SelectedItem.Text, cmbClientSite.SelectedItem.Text, cmbProjectManager.SelectedItem.Text, cmbProjectMember.SelectedItem.Text, cmbOccupation.SelectedItem.Text, txtDate.Text, Double.Parse(txtHours.Text), txtDescription.Text, CheckBox1.Checked, cmbCategory.SelectedItem.Text)
Next
MsgBox("Successfully add")
End Sub
End Class
******************
I have created parameters and declared variables of my control inside a class Timesheet
*******
Please help me with this code
oga m
|
|
|
|
|
What line is causing the exception? Have tried stepping through it with a debugger? It should be evident what is causing the object null exception if you did.
only two letters away from being an asset
|
|
|
|
|
*This line cause exception
*******************
obj.addTimesheet(txtIDNumber.Text, cmbProjectName.SelectedItem.Text, cmbClientSite.SelectedItem.Text, cmbProjectManager.SelectedItem.Text, cmbProjectMember.SelectedItem.Text, cmbOccupation.SelectedItem.Text, txtDate.Text, Double.Parse(txtHours.Text), txtDescription.Text, CheckBox1.Checked, cmbCategory.SelectedItem.Text)
oga m
|
|
|
|
|
Have tried stepping through it with a debugger? You should see which object is causing the exception and be able to figured it.
only two letters away from being an asset
|
|
|
|
|
Yes I have tried but still giving me that error message from that line.
To be honest I really don't understand what might be the problem
oga m
|
|
|
|
|
I'll give you a hint
Object reference not set to an instance of an object
Which object are trying to access that is NULL?
only two letters away from being an asset
|
|
|
|
|
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
*This is what I got from the in the error page
****************
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true">
*********
I have checked what they said I must check in my project,and its the same as this one
oga m
|
|
|
|
|
Sounds like you have NOT stepped through your code with a debugger. Do that before asking again.
only two letters away from being an asset
|
|
|
|
|
I think they are referring to the objects that are inside the repeater because,I have used a repeater to hold my control,and I can use(capture from textbox,select from dropdown) all control inside my repeater(so when I click Add Entry buttton doesn't add my information inside my table,it gives me that error.
Please help me
oga m
|
|
|
|
|
Step through your code with a debugger before asking for help again
only two letters away from being an asset
|
|
|
|
|
Hello,
I have a Web application running on ASP .NET 1.1 / Windows 2003 Server
with IIS 6.0.
We have been noticing our DefaultAppPool crashing occasionally. We
have installed the Debug Diagnostics Toolkit 1.0 and were logging the
IIS Processes. Last Sunday our IIS Crashed again (03/25/2007 7:23PM).
Appreciate your guidance,
Thanks
Srinu
|
|
|
|
|
If you look in the event viewer you should see the reason for the crash. Right click on My Computer then Management then go to the event viewer look in the application log. You should see an entry.
If you don't see an entry, then it might be that your application pool is recycling it self. By default it is set up to recycle every 27 hours or something weird like that. If you go to the properties of your app pool you can see what it is set at. I would suggest you don't recycle every so many minutes, but instead pick a time early in the morning 2am or something and recycle then.
Hope that helps.
Ben
|
|
|
|
|
Hello Ben,
Thanks for replying.
I could not find any info in event viewer regarding application pool crash.
As you said we are recycling at early hours (ie at 4am). And i dont think this might raise a issue.
But my client is unable to view the default page of the application i.e., whenever he connects to application he gets "Page not found error" and to solve this we use to restart the system. This issue come up 1-2 times a week.
Please reply regarding the same.
Srini
Srinu
|
|
|
|
|
So when you say your application pool crashes, it isn't actually stopped, but when you stop and restart the app pool it fixes your site? I would suggest you create a new application pool just for this web site. Just to make sure the problem isn't something else on the default app pool.
Hope that helps.
Ben
|
|
|
|