|
You can put a validator in edititem template. In EdititemTemplate give your textbox a ID.
YOu can do soemthign liek this:
<EditItemTemplate>
<asp:TextBox runat="server" ID="tbProjects" Width="255">
</asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="tbProjects" </asp:RequiredFieldValidator>
</EditItemTemplate>
You can replace requiredfield validator with anyother kind of validator.
Hope thisone works for you!!
-- modified at 10:16 Monday 12th June, 2006
|
|
|
|
|
Sir,
There is no click event in datagrid control.Can you please help me in creating the click event of datagrid.
Thanks and Regards
Amaneet Brar
|
|
|
|
|
hello
Actually wat do u want to know Excatly.
tell me might be possible i help u.
|
|
|
|
|
Sir,
I want to create the click event of datagrid .Is it possible?If yes Please help me.
Thanks and Regards
Amaneet Brar
-- modified at 10:26 Monday 12th June, 2006
|
|
|
|
|
There is no 'Click' event, that's true, but there are several events serving mouse click, depends on where in datagrid you click. What event exactly are you looking for? Probably SelectedIndexChanged (when you select a row), I suppose...
Anyway, select your grid in Page Designer, then right click your grid in Page Designer and select Properties. In properties window click on events icon ('lightning' icon) and u will see all supported events of datagrid.
Pilo
|
|
|
|
|
IN window application after selecting the particular row I am getting the data from 1st column of that row.
Dim str As String = CType(dg1.Item(dg1.CurrentRowIndex, 0), String)
I WANT THE DO THE SAME THING IN WEB APPLICATION.
PlEASE HELP ME.
|
|
|
|
|
I am trying to deploy a webpage with crystal report viewer on a shared web server. I get a lot of errors dll not found but when i add the dll to the bin directory. Hers is onf of my errors
Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer
any tips or ideas on a how to get crystal working on the shared webserver. All works fine on my local machine.
|
|
|
|
|
Hello
open web.config file and comment all the crystal reports realted
and now try
regards
GV Ramana
|
|
|
|
|
where did all that come from! I deleted it all but still get the error on this line of code
CrystalDecisions.CrystalReports.Engine.ReportDocument rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
error
Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer,
|
|
|
|
|
I'm not sure if this is your problem, but deploying your Crystal Reports Viewer in a Web environment requires you to have licenses...
I never understood how exactly the license thing worked (in web environment or windows forms environment, ...), but you can read about it on the internet.
hope this helps...
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
|
|
|
|
|
this also failed
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 8: asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Line 9:
Line 10: CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" Red LINES on line 10***************************
Line 11: Height="1105px" ReportSourceID="CrystalReportSource1" Width="875px" />
Line 12: CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
-- modified at 9:57 Monday 12th June, 2006
|
|
|
|
|
Hello all,
in VS 2005 When clickin on New - Web Site- New Web Site Dialog.
in this dialog
Under Visual Studion Installed Templates. It is showing only Windows Application, Class Library, Windows Control Library, Crystal Reports and Device Applicaion.
How to get ASP.NET Web Site Contents (it is suppose to display ASP.NET WebSite, ASP.NET WebService....)
i am wondering that why New Website Dialog is not displaying those. where as other PCs are displaying properly. I am unable to create a website from VS 20005.
somebody is given a solution for this is
http://geekswithblogs.net/ehammersley/archive/2005/11/08/59451.aspx[^][^]
I has repaired the VS 2005 still i am unable to create New Web Site.
any ideas?
regards
GV Ramana
|
|
|
|
|
Sir,
In the datagrid I am displaying records.Can you please tell me how I can bind all those records in the print Preview.
Thanks and Regards
Amaneet Brar
|
|
|
|
|
Hi,
I am trying to validate a drop down list using CustomValidator and even wrote a ClientValidationFunction
<br />
<asp:CustomValidator id ="ValidateModule1" ControlToValidate = "ddlModule"<br />
ClientValidationFunction = "ValidateModule" text = "Select Module" runat= "server"><br />
</asp:CustomValidator> <br />
Sub ValidateAuthor(ByVal source As Object, ByVal args As ServerValidateEventArgs)<br />
If (ddlAuthor.SelectedIndex = 0) Then
args.IsValid = False<br />
Else<br />
args.IsValid = True<br />
End If<br />
End Sub<br />
but error message is thrown even when a value other than default value is selected.
I am not able to proceed beyond this
Thanks in advance
Suma
Regards
Suma B R
|
|
|
|
|
How do you want to validate the dropdownlist? Do you want the user to have to select a new value other than the default one? If this is what you want, then you simply set the value for the default item to empty and simply use the RequiredFieldValidator to validate the dropdownlist.
|
|
|
|
|
Hi i try to done some web application into net.2 pleas tell me how to set correct path to some file.Down is my code and this url give me exception.My path is not set correctly how to set it
List<string> list = new List<string>();
string url =("xmlNames.xml");
XmlTextReader reader = new XmlTextReader(url);
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element)
{
}
}
thank's a lot
good bye and have nice day:->
|
|
|
|
|
Hello
put
string url =(@"xmlNames.xml");
and now try it wont give any Exception(but xml file should exist in bin directory)
regards
GV Ramana
|
|
|
|
|
Now give me this exception.I don't remamber which exacly class is use for path
is something like "Server.path" but i am not sure???
System.IO.FileNotFoundException: Could not find file 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\xmlNames.xml'.
|
|
|
|
|
Hi
try this
string url=HttpContext.Current.Server.MapPath("xmlNames.xml");
smiles
shema
|
|
|
|
|
i have the following code and its giving me the following error:
Cannot find column 1.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: Cannot find column 1.
** code below **
Function getCountryLocations() As DataView
'get all country Locations based on ID you supply
Dim ds As New DataSet
Dim dv As New DataView
Dim kount As Integer
Dim lid, lname As String
Dim newrow As DataRowView
objL.locationID = CType(38, Integer)
ds = objL.getCountryLocations(objL)
dv = ds.Tables(0).DefaultView
newrow = dv.AddNew()
newrow(0) = CType(objgen.getDefaultlocationsID, Integer)
newrow(1) = CType(objgen.getDefaultlocationsID, Integer)
newrow(2) = "All Locations"
kount = 0
Dim dsn As New DataSet
Dim cond As SqlCommand
Dim adpt As SqlDataAdapter
Dim conn As SqlConnection = New SqlConnection(Global.connect)
Try
conn.Open()
While kount < dv.Count
Dim r As DataRow = dv(kount).Row
lid = r("Location_ID")
' Dim sql As String = "SELECT * FROM zimg_Ads where LocationID =" & lid & "and status=1"
'cond = New SqlCommand(sql, conn)
'adpt = New SqlDataAdapter(cond)
'adpt.Fill(dsn)
objL.locationID = CType(lid, Integer)
dsn = objL.getAdsinLocation(objL)
'Dim dvn As New DataView
'dvn = dsn.Tables(0).DefaultView
lname = r.Item("LocationName")
If lid = 11 Then
lname = lname
Else
If CType(dsn.Tables(0).Rows(0).Item("Ctr"), Integer) = 0 Then
dv.Delete(kount)
Else
lname = lname & "(" & CType(dsn.Tables(0).Rows(0).Item("Ctr"), String) & ")"
r.Item("locationName") = lname
End If
End If
kount = kount + 1
End While
Catch ex As Exception
Finally
conn.Close()
conn.Dispose()
End Try
Return dv
End Function
Private Sub ddlCountry_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
'get all locations for a spec country
bindCountryLocations()
End Sub
philpetszw
|
|
|
|
|
You might want to double check the schema of the data table before setting the column value for the new row.
|
|
|
|
|
i solved the problem, thanks for your insight. the stored procedure i had was returning a single column from the database. i changed it to retrieve all the columns using a select * statement
philpetszw
|
|
|
|
|
Hi,
Is there any way to protect my ASP.Net code before installing it ?
The novice.
|
|
|
|
|
|
Hi
I P.Ramakrishna,SoftwareTrainee in ResonanaceHoldings company.I want best websites to learn ASP.NET COMPLETELY.please send .........
|
|
|
|