asp.net-3.5

Switched to ASP.NET 3.5, DropDownList doesn't remember dynamically added items

女生的网名这么多〃 提交于 2019-12-24 04:41:13
问题 I have a site that uses a couple DropDownLists that are databound. I was also doing the traditional if (!IsPostBack) {list.Databind();} and relied on viewstate to keep the lists filled during a post back. I recently converted the site to ASP.NET 3.5 and noticed that the lists are empty during postback (as if ViewState is disabled). I didn't explicitly disable anything, and am wondering if anyone has seen a similar change or behavior in their viewstate dependent controls. Thanks! James 回答1: I

when running asp.net project I get: Internet Explorer cannot display the webpage

穿精又带淫゛_ 提交于 2019-12-23 18:11:25
问题 I recently installed vs2005 with sp3.5 on a new vista computer. Never had Visual Studio installed on this computer. whenever i'm building a web project, i receive the following: "Internet Explorer cannot display the webpage". I can't run any of my projects... Thanks 回答1: This is because the system blocks the name localhost with a port number. If you replace the word localhost and type 127.0.0.1 it should work. To fix this issue, open the hosts file "C:\Windows\System32\drivers\etc\hosts" and

Dropdown list bound to object data source - how to update on a button click

删除回忆录丶 提交于 2019-12-23 10:06:33
问题 This is probably something really stupidly simple.. I have a drop down list bound to an object data source. I have set AppendDataBoundItems to true so that I can have an initial select. <asp:DropDownList ID="Accommodations1" runat="server" AutoPostBack="true" DataTextField="AccommodationTypeDescription" DataValueField="Id" OnDataBound="Accommodations1_DataBound" onSelectedIndexChanged="Accommodations1_SelectedIndexChanged" Width="200px" DataSourceID="AccommodationDs" AppendDataBoundItems=

Operation timed out error

邮差的信 提交于 2019-12-22 18:08:06
问题 I am hitting a wall with reCaptcha.net Some background - I am using reCaptcha-dotnet v1.0.5 which I got from http://code.google.com/p/recaptcha/downloads/list?q=label:aspnetlib-Latest. I was able to develop a site and make it work locally with reCaptcha validation. When I deploy it to the server (the site is hosted on 1and1.com), I am getting the error below - The operation has timed out Description: An unhandled exception occurred during the execution of the current web request. Please

ASP.NET JQuery AJAX POST returns data but within a 401 response

对着背影说爱祢 提交于 2019-12-22 14:06:45
问题 I have a Web page within my application that needs to call a web service I have set up to return a list of objects. This call is set up like so $(document).ready(function() { var response = $.ajax({ type: 'POST', contentType: 'application/json; charset=utf-8', url: '/Ajax/service.asmx/GetObjects' }); response.success(function(data) { $('#bodyText').html(data); }); response.complete(function() { alert('ajax complete'); }); }); My service looks like this namespace AjaxTest.Ajax { #region using

How to disable default skin for a particular control?

人走茶凉 提交于 2019-12-22 13:59:34
问题 Is it possible to have a control which does not use the default skin that is specified in a .skin file? I have a control for which I do not want a default skin applied to. 回答1: Find this solution in most asp.net books: use EnableTheming <asp:Button ID="Button1" runat="server" Text="Button" EnableTheming="false" /> However, it just doesn't work :D. Someone said it's a bug and suggest a workaround: set SkinID to a "not exist" ID <asp:Button ID="Button1" runat="server" Text="Button" SkinID="0" /

Getting “This method or property cannot be called on Null values” error

时光总嘲笑我的痴心妄想 提交于 2019-12-22 09:00:14
问题 UPDATE 1: The exception is being thrown on this line: client_group_details.Add(new ClientGroupDetails( ORIGINAL QUESTION: I have the following code which I have stripped down from 30 columns of data from the database to just 2 columns from the database. I get an error whenever any of the columns return a NULL value: public class ClientGroupDetails { public String Col2; public String Col3; public ClientGroupDetails(String m_Col2, String m_Col3) { Col2 = m_Col2; Col3 = m_Col3; } public

What's the best way to minify the ASP.NET generated Javascript?

白昼怎懂夜的黑 提交于 2019-12-22 03:45:50
问题 What's the best way to minify the ASP.NET generated Javascript, such as the ones served by webresource.axd, in ASP.NET 3.5 at runtime? I tried using the MbCompression module but it's not working with those resources. 回答1: If you want to minify the ASP.NET AJAX JavaScript, ensure that you've updated the compilation section of your web.config to turn off Debug mode: <compilation debug="false"> This will ensure that the ScriptResource files are minified, however unless you've supplied minified

What's the best way to minify the ASP.NET generated Javascript?

青春壹個敷衍的年華 提交于 2019-12-22 03:45:05
问题 What's the best way to minify the ASP.NET generated Javascript, such as the ones served by webresource.axd, in ASP.NET 3.5 at runtime? I tried using the MbCompression module but it's not working with those resources. 回答1: If you want to minify the ASP.NET AJAX JavaScript, ensure that you've updated the compilation section of your web.config to turn off Debug mode: <compilation debug="false"> This will ensure that the ScriptResource files are minified, however unless you've supplied minified

Returning a recordset from Oracle to .Net using an Oracle function that takes arguments

倾然丶 夕夏残阳落幕 提交于 2019-12-21 21:34:18
问题 I currently have the following funciton in an oracle database that returns a concatenated string seperated by pipes. It's a legacy application that is being updated to use .net 3.5. The exiisting application concatenates the returned result set into a VARCHAR2 data type. What I want to do is return the entire result set back to my .net client. The MS SQL equivalent of what I'm trying to accomplish is a simple "SELECT * FROM TBL WHERE id = @id" I'm not use to some of the concepts Oracle uses.