|
Standard question #2:
What error message do you get?
You have a smiley in the code where there should only be a parenthesis. I guess that it's the characters ; ) that causes that smiley, which means that you have a semicolon in the middle of the statement. As semicolons separate statements, you have split your statement in two, which will each cause a syntax error.
---
Year happy = new Year(2007);
|
|
|
|
|
Add the attribute in the following way
private void Repeater1_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
HtmlInputText txt = (HtmlInputText)e.Item.FindControl("txtOnNBH");
txt.Attributes.Add("onchange","fun('" + Repeater1.ClientID + "')");
}
}
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
the following code is for connecting a DropdownList with a Ms-access record but its not working.....Pleas help me
Dim DBConnection As System.Data.OleDb.OleDbConnection
Dim DBCommand As System.Data.OleDb.OleDbCommand
Dim DBReader As System.Data.OleDb.OleDbDataReader
Dim SQLString As String
Dim DataSet1 As System.Data.DataSet
If Not Page.IsPostBack Then
DBConnection = New System.Data.OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Documents and Settings\All Users\Documents\Attendance\BTA_ DB_Design\BTAS.mdb")
DBConnection.Open()
DBCommand = New OleDb.OleDbCommand("SELECT Employee_ID FROM Attendance_Details", DBConnection)
OleDbDataAdapter1.SelectCommand = DBCommand
OleDbDataAdapter1.Fill(DataSet1, "Attendance_Details")
DropDownList1.DataSource = DataSet1.Tables("Attendance_Details")
DropDownList1.DataValueField = "Employee_ID"
DropDownList1.DataBind()
DBReader.Close()
DBConnection.Close()
Error:-Value cannot be null. Parameter name: dataSet
Praveen.K
System Engineer
Graviton Technologies Pvt.Ltd
|
|
|
|
|
Initialize data set before filling it ... like ..
DataSet1 = New DataSet
OleDbDataAdapter1.Fill(DataSet1, "Attendance_Details")
also remove DBReader.Close() .. because you have not used it at alll...
Kk
|
|
|
|
|
sir after the specified modification the following line of error is appearing.
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 of error:::
-----------------------------------
DBConnection.Open()
Line 39:
DBCommand = New OleDb.OleDbCommand("SELECT Employee_ID FROM Attendance_Details", DBConnection)<br />
<br />
Error line:-Line 40: OleDbDataAdapter1.SelectCommand = DBCommand<br />
Line 41: DataSet1 = New DataSet<br />
Line 42: OleDbDataAdapter1.Fill(DataSet1, "Attendance_Details")
-- modified at 23:39 Wednesday 31st January, 2007
Praveen.K
System Engineer
Graviton Technologies Pvt.Ltd
|
|
|
|
|
Hi it should look similer to this.. i tried here.. its working fine...did you remove the statement DBReader.Close() ?????
Dim DBConnection As System.Data.OleDb.OleDbConnection
Dim DBCommand As System.Data.OleDb.OleDbCommand
Dim DBReader As System.Data.OleDb.OleDbDataReader
Dim SQLString As String
Dim DataSet1 As System.Data.DataSet
If Not Page.IsPostBack Then
DBConnection = New System.Data.OleDb.OleDbConnection( _
"put your connection string here")
DBConnection.Open()
DBCommand = New OleDb.OleDbCommand("select email from users", DBConnection)
OleDbDataAdapter1.SelectCommand = DBCommand
DataSet1 = New DataSet
OleDbDataAdapter1.Fill(DataSet1, "Attendance_Details")
DropDownList1.DataSource = DataSet1.Tables("Attendance_Details")
DropDownList1.DataValueField = "email"
DropDownList1.DataBind()
DBConnection.Close()
End If
Kk
|
|
|
|
|
yes,
Its working sir.the problem was with my database...The problem was when i am working with a database in a user permission account i cant access the DB.When i changed the location of the DB to some other system directory, it works.Any way thanks for u'r asistance.
Regards
Praveen.K
System Engineer
Graviton Technologies Pvt.Ltd
|
|
|
|
|
Hi all,
Can anyone tell me how do work with Crystal Reports.I am total new to in this. I have done few things but when I run my Application I cant see anything.
Please tell me the step by step guide line for the same.I need to take the data from database(query) and depending upon the query I have to display the records.This record can have 3 or 4 and any number of columns,columns should be displayed dynamically.
Thanks in advance.
|
|
|
|
|
Hi,
I have a problem with a datagrid.
I want to add an extra row to it, this works fine by building tablecells and add them to the grid for each entry in the grid.
The extra rows can be edited by the user, but I don't know how I can bind this extra rows to my datagrid, so the changes of the user are recognized by the webform.
can you please help me with my Problem, or is it impossible to add extra rows, that can be edited by a user?
thank you for your help
Peggy
|
|
|
|
|
Hi,
I am using ASP.NET 2.0 with VB.NET. I want to hide some column if user is not logged in.
So how to hide any column in repeater control dynamically - I m bit new to .net 2.0 and using repeater control first time.
Thanks.
|
|
|
|
|
+Use the data binding expression to set the Visible property of the element that you want to hide.
+Use the ItemCreated/ItemDataBound event of the Repeater control to hide the control if the user is anonymous.
|
|
|
|
|
Hi to all,
Can anybody give me an idea how to use crystal reports with asp.net?I am new to this crystal reports.Give me some URL's so that i can learn from them.
Thanks in advance.
kissy
|
|
|
|
|
|
i have a 'pic' field of varchar in my database table where i want to store image path . how can i insert a path of a image using 'file upload' control in 'formview' insertitemtemplate.
Chohan
|
|
|
|
|
+ Specify a ControlParameter in the datasource control that you use with the FormView, and you can point the parameter to the FileUpload control.
+ You can simply use a general Parameter and get reference to the FileUpload control in the FormView using the FindControl method to the read the file path.
|
|
|
|
|
Hi to All
Can Anyone tell me How to Desplay Some Dynamic Data on the page which can come from database
Amit M
|
|
|
|
|
Hi Amit
You can use label for it
|
|
|
|
|
|
Hi all .
I insert a table in my form then I righ click on it and change it to "run as server"
then I put a textbox in it and name it txtuser.
when I run the program this error appears in the explorer ( the page i run) :
Server Error in '/TESTING' Application.
--------------------------------------------------------------------------------
Control 'txtuser' of type 'TextBox' must be placed inside a form tag with runat=server.
please help me
|
|
|
|
|
Hi
Can you post the part of the html code that giving the problem ?
|
|
|
|
|
< asp:TextBox id="TextBox1" runat="server">
it run as server but i face problem when running (debug)
its error : Control 'TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server.
plz help me
|
|
|
|
|
sanaziuse wrote:
< asp:TextBox id="TextBox1" runat="server">
Place all your server controls inside a form with runat="server" attribute. For example,
< asp:TextBox id="TextBox1" runat="server"/>
< asp:TextBox id="TextBox2" runat="server"/>
< asp:TextBox id="TextBox3" runat="server"/>
|
|
|
|
|
what do u mean by Form?
how this will work?
|
|
|
|
|
thank you I fixed my problem by your help using
|
|
|
|
|
Hi
i think the problem is in HTML itself see the end tag of the form also
< asp:TextBox id="TextBox1" runat="server"> NO end tag for textbox <b<i>>No end tag for (Instead of )
OK next if then also preoblem is not solve give whole html file so that i can check it
|
|
|
|