asp.net

Staying on current jQuery tab across post back?

I am using jQuery tabs and an ASP.NET listview to display and edit some information. My problem is that when a user inserts a new record in one of the listview items my jQuery tabs go back to the first tab. Is there a way to keep track of which tab I am on or keep it from resting on post back? ...

Determine corresponding field names of items in Request.Files?

Given a set of uploaded files in Request.Files, how do figure out which form field yielded which file? I have a generic form emailer that various forms post to. This file generates an email of the name/value pairs contained in the form post. I'm trying to add support for uploaded files such that the table of name/value pairs will show t...

Authentication through a token pass in ASP.NET MVC

I'm working on a solution to part of my companys site that is done in 2 different languages. My part of the project is in ASP.NET, and the login portal is in a different language. We pass authentication credentials by storing login information in the database on the portal page and then sending a corresponding token to the URL in the ...

Port forwarding on Windows 7

How do I redirect an incomming request on port xxx to localhost:yyy on windows 7? Development Server (vs 2008) only allow access from localhost which isnt good enough. I need to test my app from various computers. ...

ASP.Net Web Form + Ajax Data lost on post back. Possible cause ? Ajax or changing visible property

I have two Repeater controls, each hosted in a user control. Both user controls are contained in the same aspx page. Only one User Control is visible at any one time. The repeaters are comprised of checkboxes, and text boxes for user input. The aspx page is configured with an Ajax ScriptManager; and contains several Ajax UpdatePanels...

ASP.NET 4.0 Charting - How can one display a explanatory message in the chart area when the databound query returns no results?

I have a .Net 4 Chart Control bound to stored proc. For some customer selected queries the chart will be empty. I would like to display a "No data" message in the empty charting area so customers understand why the chart is empty. I haven't been able to find any information about how to do this. ...

Cascading dropdown empty after postback

A form contains 2 cascading dropdowns. When an item is selected in the first dropdown, jQuery retrieves a list (json) from the server and fills the 2nd dropdown. The user posts the page to the server, and when the page is returned the dropdown is empty because its not stored in viewstate. What do you do in this situation? Is this the ...

Populate label from single field in sql server

I have a column in a table that contains a message and I want this message to be displayed in a label. Here is my code which currently doesn't populate the label. Protected conString As String = ConfigurationManager.AppSettings("sqldirectory") Dim cnn As New SqlConnection(conString) Dim cmd As New SqlCommand("select message from [da...

Sql server 2005 with ASP .NET encoding issue

Hi, I'm writing once again about my encoding issue... Now with some code samples. In a nutshell: when saving to database input data, some language specyfic characters like polish 'ń' won't save - insted 'n' is saved. On the other hand, string: Adams æbler, with æ is saving. Here is code begind code that does save stuff and displays d...

Localize a MasterPage

I have a MasterPage and some controls in it, I also have a dropdown with languages, I'd like to know if theres is way to localize all of the controls within the masterpage because it doesn't have the InitializeCulture method. Thanks in advance. ...

Combine WebResource.axd CSS requests

I have developed some ASP.NET server controls which include their own javascript and css files. A lot of these controls use jQuery extensions which, as you know, often include their own css files. I'm using Telerik's RadScript manager which combines the javascript like a boss. However, I'm using the AjaxToolkit's ClientCssResource att...

how to prevent select item in dropdowlist using javascipt?

I want prevent user to select dropdown list items using javascript methods. Is there anyway use OnMouseKeyDown so I can stop there. I donot want use Enable=false. Javascripts gurus, help me out. ...

Error accessing unmanaged dll in .net wcf

I have a WCF referencing a managed assembly in the project. The managed assembly inturn invokes an unmanaged assembly which is copied to the bin folder of the WCF. During runtime, calling any method in managed assembly throws exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt....

In ASP.NET 2.0 how do I remove the extra tabs and line breaks from the rendered page/control output?

I have been researching this one for awhile. I found several resources on the subject and they all tend to use the same approach - override Page.Render, use the HtmlTextWriter to convert the output into a string, and then use a series of compiled regular expressions to remove the extra whitespace. Here is an example. Well, I tried it an...

ASP.NET MVC Razor syntax

Here is what I would like to express by Razor: <b>@parameterMapping.Title</b> (Category: @parameterMapping.Category.Title, Regexp: @parameterMapping.Regexp) But to make it parseable I have to write it this way: <b>@parameterMapping.Title</b> <text>(Category: </text> @parameterMapping.Category.Title <text>, Regexp:</text> @parameterMa...

Include in web.config File

I need to know whether there is another way to include external files in web.config apart from configSource="Source". The reason why I am asking is, I am working with UrlRewriter.net module. <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligenci...

jquery method is not allowed

How can allow this page to run on IIS server... It does not work on localhost..... it works when I open it directly... It gives the error "it is not allowed...! The working Example..! I want this.. "" the Erorr: <html> <head> <script src="jquery.js" type="text/javascript" language="javascript"></script> <script src="jquery.xml2json....

authentication for a Web service options

I am new to Web services and .NET. I have to authenticate a web service that is being accessed using http post. I tried putting a custom soap header and sending it to the service and checking the header in service but the header object is always null in the service. also if i put the user and password options in http headers how can ...

ASP.NET MVC - Accessing Url.GenerateUrl from Outside the Controller

Hi, i am trying to move my business logic out from the controllers and into their own services. I have setup my controller like so: public class AccountController : Controller { private readonly IAccountService _accountService; public AccountController(IAccountService accountService) { _accountService = accountSer...

My ASP.NET MVC2 application with Forms Authentication is blocking access even to Images, Styles and Scripts

Hi, I'm developing a MVC2 application and using Forms Authentication on it. The scripts, images and styles are all blocked to unlogged users and, consequently, the login page looks awful. It works well local, the problem is when I publish to the server. Does anyone has any idea WHY???? PS: The server IIS is version 7.5 My Web.config...