|
If possible, you should use the SqlClient connection instead of the Odbc connection.
Sovann wrote: but in ASP.net there are not DataTable and DataRow.
Yes, there is.
You have full access to the .NET framework in ASP.NET.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Sovann wrote: but in ASP.net there are not DataTable and DataRow
You are in a confusion. ASP.NET do have OdbcDataAdapter, DataTable, etc. Check whether you have referred System.Data to the Website reference.
Again add Import statment as,
Imports System.Data
Imports System.Data.Odbc
to the Codebehind file.
|
|
|
|
|
Is there any specific reason that you are going for ODBC ? If not as Guffa suggested, use SQLConnection class. It is made to connect to SQL Server database. ODBC adds an extra layer to the communication, and it will be slow.
|
|
|
|
|
I have a link on my asp webpage to open a .ppt file in a new window. The file opens fine in IE 6 and FireFox. In IE 7, it opens PowerPoint with a blank slide. But if I right click the link on my webpage and save locally I am able to view the contents of the powerpoint. What is going on? Is IE7 blocking the content?
|
|
|
|
|
|
Is it possible to use C++/CLI as the 'code behind' of an ASP.NET page? I've been googling and found many responses that such thing is possible, yet I haven't found any example so far.
Thanks in advance.
Stupidity is an International Association - Enrique Jardiel Poncela
|
|
|
|
|
Yes. This article[^] explains how to do it.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks a lot.
Stupidity is an International Association - Enrique Jardiel Poncela
|
|
|
|
|
i am making a registration form and want to use CreateUserWizard control from login controls.
But there are only limited fields and i want to use some additional fields also like , zip,hobbies,education,etc and is there any way to do so without using the concept of "profile".
for this purpose i want to use my own database .
I am new to ASP.NET and C# (Beginner level) so i request you to post the code .
I will be highly thankful to you!
Er.Amar Shukla
|
|
|
|
|
I would start by reading the documentation[^].
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Can any body please let me know what are the advantages of ASP.NET 3.5 over ASP.NET 2.0 ?
|
|
|
|
|
|
using document.getElementById(button.ClientID %>').click iam able to call button event of teh server button but how can we call dropdown list selection changed event using jaascript
|
|
|
|
|
Not too surprisingly document.getElementById('<%=dropdown.ClientID%>').onchange
|
|
|
|
|
If you have enabled AutoPostBack property for drop down list, check the onchange JS event for that control. Make a call from your JS like that.
|
|
|
|
|
Hi,
I'm starting at at a new job and am having some trouble making some legacy code work. The project was auto-imported to VS 2008 from 2005. There is a Web Service that works just fine when invoked in a browser but when it is instantiated in a desktop application all methods and members are visible but the methods all have a value of null.
I'm sure I'm overlooking something obvious here so I'm asking if anyone can point me in the right direction.
Thanks,
Bill Prada
|
|
|
|
|
Good day.
First, I have to ask, to please excuse my English.
I have an aspx page with 5 comboboxes on it. The 2nd combobox's details is dependand on the 1st one's selectedValue and combobox 3,4 and 5 is dependand on combobox2's selectedValue. Auto-postback is enabled on both combobox 1 & 2.
Whenever I choose a value in combobox 1, the data in combobox 2 gets updated and the first item in combobox2 is automatically selected. The problem with this is that data in combobox 3, 4 & 5 is dependant om the selectedValue of combobox2 and also needs to be updated with the new selectedValue of combobox2, but it does not get updated when the selectedValue of combobox2 changes as a result of the change in combobox1.
The problem exists when a users choice is the value already selected in combobox2, then the data for comboboxes 3, 4 & 5 aren't populated correctly.
It doesn't help disabling of hiding comboboxes 3-5 and only enabling it when the selectedValue of combobox2 changes, because the user will still click on the same value already selected, and the event will not fire.
I also tried adding a "empty" value to the combobox and selecting it as default, but this will lead to a foreign key violation in the databse.
The question is...
Is there a way, that I can (without adding an empty entry in the database - bad practise) set the initial selected item to a blank entry, thereby forcing the user to change the selected index?
I'm currently using ASP.Net 2.0 and the back-end code is in C#. I can make use of Javascript, but the application I'm developing doesn't work all to well with AJAX.
Thanks in advance.
JD Stuart
|
|
|
|
|
jdstuart wrote: The question is...
Is there a way, that I can (without adding an empty entry in the database - bad practise) set the initial selected item to a blank entry, thereby forcing the user to change the selected index?
After binding the drop down list, insert a new item at the 0th position.
DropdownList.DataBind();
DropDownList.Items.Insert(0,"Select one")
|
|
|
|
|
The problem however exists when the user doesn't choose one, then the entry into the database would render the foreign key constraint invalid.
|
|
|
|
|
Before doing insertion, check if the SelectedIndex is 0 ? If it is 0, display a message to choose the item.
|
|
|
|
|
I found a way of getting around this problem.
After the data is bound to the combobox. Write: combobox.items.insert(0, new ListItem("Choose one", "-1")); then add a required field validator that validates the value of the combobox, but set the InitialValue property of the validator to "-1".
This allows the combobox to be validated without the need of a postback.
|
|
|
|
|
I have a wrox instant results cd that has a chat application that works great on my dads computer but will not perform on my newer more powerful dell. I perform the exact same steps on both units. both units have xp professional and visual basic express 2005 installed from the same cd. Both units the same cd's one works the other does not.
Can anyone help me??
|
|
|
|
|
Unless you provide more specific information, like details of the error you are getting, it's unlikely anyone will be able to help you. The people on this forum specialize in software development,not mind reading.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Im not getting any errors the chat window does not appear above the text enter texbow
|
|
|
|
|
Have you maybe tried one of the WROX forums?
|
|
|
|