|
try this one
<script language="javascript">
function textboxMultilineMaxNumber(txt,maxLen){
try{
if(txt.value.length > (maxLen-1))return false;
}catch(e){
}
}
</script>
runat="server" Height="103px" MaxLength="100" Width="166px" onkeypress='return textboxMultilineMaxNumber(this,100)' TextMode="MultiLine"
Jintal Patel
|
|
|
|
|
Two applications are accessing a same database.First is the vb6 application and another is the asp.net c# website.Now my question is when the website access the database , after completing the request it closes the question , still it renders the database in read only file state.y this is happening?
how can i change the read only ?
Soniagupta1@yahoo.co.in
|
|
|
|
|
I want to change DropDown List width Dynamic or at runtime.
Jintal Patel
|
|
|
|
|
i think the drop-down length should automatically exceeds according to the lenght of the text at run-time
Soniagupta1@yahoo.co.in
|
|
|
|
|
|
ddl.Width=Unit.Pixel(100);
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi ,
I had a project in version 1.1 and I have
migrated it to 2.0 using visual studio .NET 2005 but its throwing the
following script error in IE 6.0 only while selecting any value in drop down.
'event' is null or not an object.
In firefox, it is working fine.
I used DOM Validations for firing client side validations. This error is firing even before the drop down's selected index changed function is called.
Can anyone please help me out to solve this. is there any property or
setting i have to make for 2003 project to work in 2005?
Is it a bug in VS.NET or is there anything settings to be made?
kindly do help me guys.
Vikram
|
|
|
|
|
Hi,
Please go through below URL you will find there all issues about the migration.
http://msdn2.microsoft.com/en-us/library/aa479312.aspx
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Hi,
The URL mentioned did not help me.
is there anything else to do
please help me out
thanks in advance
|
|
|
|
|
Hi all,
I need to make textbox cum combo box where I can search for a key. Like we have in word text formatting ie; Suppose I have to change the font style from Arial to Verdana then I just type V and I get the list all style starting with V.
Same thing I need to implement thro AJAX AutoCompleteExtender and CascadingDropDown or any other way. I am using ASP.NET 2.0 (C#)
Please help me with this, how do I start....
Thanks in advance...
|
|
|
|
|
I hav an ASP application. in that i have a page in that page a hyper link is there, when i click that hyperlink i hav to pass that hyperlink value to database and retrieve some information from databse and display it in the same page .. how can i do that... i am not familiar with ASP.. so pls help mee
(simply say, i just wantd to retrieve some data from DB by using the value of Hyperlink and display it in the same page)
Sarith...
|
|
|
|
|
When you click on Hyperlink then save the value in session,
On page load event get that value from the session, If session is not null then execute the database command for retrive the data and show it on page.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
|
Hi All,
How to create a report builder for end user in web application. The end user can be able to construct query at run time like they can choose table and fields, can give aggregate functions and filter conditions etc. After this, the end user can able to create report using some tool like our RS2000/2005 report builder. When I was checked with report server-report builder, the client system needs to have MS Visual studio IDE. Can any one came around any tool for this?
Thanks in advace.
Kavitha
|
|
|
|
|
Hi there,
i want to validate user input in the text box which take a document number to check in database, the input must be in this format SSD-SGZZ99-A0101 or SSD-SGZZ99-AE0101 [(3alpha)(-)(4alpha 2numeric)(-)(1 or 2alpha 4numeric)] Total 16 or 17 character, now can some one send me a sample to validate this requirement.... i also want to disable the button till this validation is not completed, once the user keyin the right number the button should be enable.
any suggestion will be appreciated.
i need the sample code to use the custom validator control.
Regards
Ybasha
|
|
|
|
|
i need the script to validate some thing like this
function validateDate()
{
var ptext = document.getElementById("TBDocNum");
if(ptext = ("(SSD)|(SSA)(-)(a-zA-Z0-9){4,2}(-)(a-zA-Z0-9){6,2})");
}
but it not correct any help on this???
|
|
|
|
|
or can some one give me a simple to break this string
SSD-SGZZ99-A0101 --> 16 character or
SSD-SGZZ99-AE0101 --> 17 character
to added in ValidationExpression="(SSD)|(SSA)(-)(a-zA-Z0-9){4,2}(-)(a-zA-Z0-9){6,2})" for regular expression validator.
regards
Ybasha
|
|
|
|
|
Hi there,
I already got the solution.
regards
ybasha
|
|
|
|
|
A Hard question.
I Have page in aspx, but in different page i would not to redirect, but to read entire content in html format into string?
It is like Response.Redirect, it executes, and convert to html then redirect. But i want to do exactly same, expect redirect, but to string.
I want to do this, because that html would be sent as an email.
Thanks you in advance.
|
|
|
|
|
If you need to grab the HTML source that is returned from a web page, then you use the WebRequest[^] Class to request the page and that will return a WebResponse[^]
WebRequest request = WebRequest.Create("http://www.tempuri.org");
WebResponse response = request.GetResponse();
Stream responseStream = response.GetResponseStream();
response.Close();
|
|
|
|
|
Thanks you very much. That's what i needed.
|
|
|
|
|
I try to display data of all employees weekly report. I am using nested gridview, where i need to pass Userid from parent to child gridview so that it display the data according to Userid.
Can some help me on this to pass the values?
Here is my code:
Protected Sub btnook_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOOk.Click
Dim strsql As String = ""
Dim strsdate As String = String.Format("{0 }", TextBox1.Text)
Dim stredate As String = String.Format("{0 }", TextBox2.Text)
parentgrid(strsdate, stredate)
MsgBox("after function called")
End Sub
Public Function parentgrid(ByVal stsdate As String, ByVal stedate As String) As DataSet
Dim strsdate As String = String.Format("{0 }", stsdate)
Dim stredate As String = String.Format("{0 }", stedate)
'Dim struser As String = user
Try
strsql = "SELECT b.Userid, sum(format(b.Time2 - a.Time1, ""h.mm"")) AS TotalTime FROM " _
& "(select Userid, num,TimeStamp as time2, pdate from PunchClock " _
& "where InOut='IN' AND PDate >= #" & strsdate & "# And PDate <= #" & stredate & "# " _
& " ORDER BY timestamp) AS b INNER JOIN " _
& "(select Userid, num,TimeStamp as time1, pdate from PunchClock " _
& "where InOut='OUT' AND PDate >= #" & strsdate & "# And PDate <= #" & stredate & "# " _
& "ORDER BY timestamp) AS a ON (b.num = a.num) AND (b.pdate=a.pdate) and (b.Userid=a.Userid) group by b.userid;"
'Opening the database
cmd.CommandType = CommandType.Text
cmd.CommandText = strsql
cmd.Connection = con
con.Open()
MsgBox("Main" & strsql)
objReader = cmd.ExecuteReader
MsgBox("Out2:" & strsql)
da = New OleDbDataAdapter(strsql, con)
ds = New DataSet("Userdetail")
dt = ds.Tables.Add(strsql)
da.Fill(ds, strsql)
con.Close()
ParentGridView.DataSource = ds
ParentGridView.DataBind()
Catch ex As Exception
MsgBox("oops: " & ex.Message, MsgBoxStyle.OkOnly, "Error")
con.Close()
End Try
Return ds
End Function
Protected Sub ParentGridView_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles ParentGridView.RowDataBound
Dim strsdate As String = String.Format("{0 }", TextBox1.Text)
Dim stredate As String = String.Format("{0 }", TextBox2.Text)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim gv As GridView
gv = e.Row.FindControl("ChildGridView")
Dim struser As String
struser = e.Row.FindControl("EmpName").ToString()
Try
strsql = "SELECT b.Userid, Format([b.PDate],""m/d/yyyy"") AS PDate, b.Time2, " _
& "b.InOut as TIN, a.Time1, a.InOut as TOUT, format(b.Time2 - a.Time1, ""h.mm"") AS TotalTime FROM " _
& "(select Userid, PDate, num, TimeStamp as time2, InOut from PunchClock " _
& "where Userid='" & struser & "' AND InOut='IN' AND PDate >= #" & strsdate & "# And PDate <= #" & stredate & "# " _
& "ORDER BY PDate, timestamp) AS b INNER JOIN " _
& "(select Userid, PDate, num, TimeStamp as time1, InOut from PunchClock " _
& "where Userid='" & struser & "' AND InOut='OUT' AND PDate >= #" & strsdate & "# And PDate <= #" & stredate & "# " _
& "ORDER BY PDate, timestamp) AS a ON (b.num = a.num) AND (b.pdate=a.pdate) " _
& "group by b.userid, b.PDate, b.time2, a.time1, a.InOut, b.InOut " _
& "ORDER BY b.PDate, b.time2, a.time1;"
'Opening the database
cmd.CommandType = CommandType.Text
cmd.CommandText = strsql
cmd.Connection = con
con.Open()
MsgBox("Parent" & strsql)
objReader = cmd.ExecuteReader
MsgBox("Out2:" & strsql)
da = New OleDbDataAdapter(strsql, con)
ds = New DataSet("Fulldeatils")
dt = ds.Tables.Add(strsql)
da.Fill(ds, strsql)
con.Close()
gv.DataSource = ds
gv.DataBind()
Catch ex As Exception
MsgBox("oops: " & ex.Message, MsgBoxStyle.OkOnly, "Error")
con.Close()
End Try
End If
End Sub
HTML:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<title>Untitled Page
<asp:label id="Label8" runat="server" text="Start Date:" width="104px">
<asp:textbox id="TextBox1" runat="server" width="112px">
<asp:imagebutton id="ImageButton1" runat="server" imageurl="~/Images/calendar.jpg"
="" width="24px"> <asp:calendar id="Calendar1" runat="server" height="120px" visible="False"
="" width="176px">
<todaydaystyle backcolor="Transparent" forecolor="Red">
<weekenddaystyle backcolor="#FFC0C0" forecolor="#804040">
<asp:label id="Label9" runat="server" text="End Date:" width="104px">
<asp:textbox id="TextBox2" runat="server" width="112px">
<asp:imagebutton id="ImageButton2" runat="server" imageurl="~/Images/calendar.jpg"
="" width="24px">
<asp:calendar id="Calendar2" runat="server" height="120px" visible="False" width="176px">
<todaydaystyle backcolor="Transparent" forecolor="Red">
<weekenddaystyle backcolor="#FFC0C0" forecolor="#804040">
<asp:button id="btnOOk" runat="server" font-bold="True" forecolor="Black" text="OK"
="" width="56px">
<asp:button id="Button3" runat="server" font-bold="True" forecolor="Black" text="Cancel">
<asp:button id="Button1" runat="server" text="Button">
<asp:gridview id="ParentGridView" runat="server" style="z-index: 100; left: 27px; position: absolute;
top: 509px" autogeneratecolumns="False" backcolor="White" bordercolor="#336666" borderstyle="Double"
="" borderwidth="3px" cellpadding="3" gridlines="Horizontal" allowpaging="False" datakeynames="Userid" onrowdatabound="ParentGridView_rowDataBound">
<footerstyle backcolor="White" forecolor="#333333">
<rowstyle backcolor="White" forecolor="#333333">
<selectedrowstyle backcolor="#339966" font-bold="True" forecolor="White">
<pagerstyle backcolor="#336666" forecolor="White" horizontalalign="Center">
<headerstyle backcolor="#336666" font-bold="True" forecolor="White">
<columns>
<asp:templatefield headertext="Employee Name">
<itemtemplate>
<asp:label id="EmpName" runat="Server" text="<%# Bind("Userid") %>">
<asp:boundfield datafield="TotalTime" dataformatstring="{0:n}" headertext="TotalTime">
<asp:templatefield headertext="Weekly Report" insertvisible="False">
<itemtemplate>
<asp:gridview id="ChildGridView" runat="server" autogeneratecolumns="False">
<columns>
<asp:boundfield datafield="PDate" headertext="Date" htmlencode="False">
<asp:boundfield datafield="Time2" dataformatstring="{0:t}" headertext="TimeIn" htmlencode="False">
<asp:boundfield datafield="TIN" headertext="In" htmlencode="False">
<asp:boundfield datafield="Time1" dataformatstring="{0:t}" headertext="TimeOUT" htmlencode="False">
<asp:templatefield headertext="TOUT">
<itemtemplate>
<asp:label id="Label2" runat="server" text="<%# Bind("TOUT", "{0:t}") %>">
<footertemplate>
<asp:label id="Label7" text="Total:" font-bold="True" width="50" borderstyle="Solid"
="" borderwidth="0" style="padding:2px; margin-top:5px" runat="Server">
<asp:label id="Label4" text="OverTime:" font-bold="True" width="50" borderstyle="Solid"
="" borderwidth="0" style="padding:2px; margin-top:5px" runat="Server">
<asp:templatefield headertext="TotalTime">
<itemtemplate>
<asp:label id="Label3" text="<%# FormatNumber(Get_Time(Eval("TotalTime"))) %>" runat="Server">
<footertemplate>
<asp:label id="TotalTime" text="<%# FormatNumber(Get_Total_Time()) %>" width="80" runat="Server"
="" font-bold="True" borderstyle="Solid" borderwidth="1" bordercolor="#C0C0C0" style="padding:2px; margin-top:5px">
<asp:label id="Label5" text="<%# FormatNumber(Get_Over_Time()) %>" runat="Server">
<itemstyle horizontalalign="Right">
<footerstyle borderwidth="0px" font-bold="True" horizontalalign="Right">
Shrihit
|
|
|
|
|
No one will probably help until you put the code within <pre> </pre> tags.
|
|
|
|
|
type priortity status
---------------------------------------
bug low postponed
bug low yy
bug medium xx
bug1 low xx
bug1 high postponed
---------------------------------------
The above table's data is required in following format as grouped data and needs to be displayed in a datatable or gridview.
Can anyone give me code.
---------------------------------------
low postponed
bug yy
---------------------------------
medium xx
----------------------------------------
low xx
bug1
--------------------------------
high postponed
sanjay kumar samantaray
|
|
|
|
|
|