.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

returning data as hyperlink works but doesn't work

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :ASP.Net

Please help. I have a form that searches my database and returns results well but each record contains a cell with a link to another html page. The problem is that whether I place the html pages in the same directory as the .asp codes or in a separate directory with the link being an absolute URL, the action of clicking on the link fails to redirect. Is it possible?

The returns are addresses and the link in each record is to it's own address page with google map.

View Complete Post

More Related Resource Links

When I use 'publish', site doesn't work when i post data


Arrgghh, I am so tired of dealing with stuff like this

I've got a project, when I put up on another server I point two sites in IIS6 to it

i have

http://www.main.com  pointing to the folder the files are in


http://www.anotherofoursites.com/main pointing to that same folder in it's own "Virtual Application" or whatever IIS calls it when you put a folder into it's own 

If I just "Build" and push all the files up.. both work without issue and as expected...  but when I use "Publish" to precompile, the site works until I post, and then i get nailed with:

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Repeat Report Item with Data Region on Every Page - doesn't work

Hi All, The Repeat Report Item with Data Region on Every Page property does not work - or atleast not the way i would expect it to. My report contains a header which is the Report Name. In the report body - I have text box with the company name, pulled from a data set. Below the company name i have a line, followed by a text box displaying the selected parameters. When I run the report, the first page displays all information as expected. However, subsequent pages only display the report header (report name) with the table butted up against it. I have tried setting the Repeat Report Item with Data Region on Every Page to true (and the data region to my table) for the Company Name text box, the line, and the parameters text box. This has no affect i.e. page 2, page n... are not printing the three items. Any suggestions much appreciated. Thanks.  Clay

unmanaged C dll works in VS2005 but It doesn't work on other PC without it


I have a VB winforms, I use function from unmanaged C++ dll "Reserva.DLL" (Manifest: <assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>).

I use this code to call the functions:

  Private Declare Sub CreateReserva Lib "RESERVA.dll" ()
    Private Declare Sub DestroyReserva Lib "RESERVA.dll" ()
    Private Declare Sub DatosPozo 

Crawl doesn't work and Query server is not responding; Search works only for old (crawled) contents


We have following three servers with MOSS 2007 STD deployed in SharePoint server farm,


App01- Query Server

App02 - Index Server (We are using this server as dedicated web front end computer for crawling)

SPDBServer - SQL 2005


Search was working fine till 01/05/2008 and it stopped working after this date only for new contents meaning search is still working fine for the old contents which were added before 01/05/2008 but not for new contents added after 01/05/2008.


We have been working to find out reasons why did that happen? We have found following event ids on Query server,


Event ID:10042 - A new query machine, 'App01', has been added to the query rotation based on changes to farm topology.

PageData weirdness, works, then doesn not work. Change the 'index' name and it works again


I'm facing a weird issue. I have a page "add.cshtml" in wich I create a PageData object like this:


PageData["myObject"] = new { Message = "some msg", ID = 1, Name = "some name" }

In that same page, I pass the object to a RenderPage:



@RenderPage("form.cshtml", PageData["myObject"])


In "form.cshml", I simply call values like this:


<br />

When I call "add.cshtml", it works, then for some reason, at some point, I get an error stating: "object" does not contain a definition for Message, if I comment the @PageData["myObject"].Message, error occurs on next property.

When this happens, I change "myObject" to another value in both files, and no more compilation error.

Why does this happen?



Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

Ajax Asyncfileupload doesn't work as soon as I put it in a control


Hi guys,

I can't get my <ajax:asyncfileupload> working and I don't see why...

When outside any panel or table it is working well, but as soon as I put it in a <asp:panel> or table I get a strange error which seems to be on client-side but I don't understand what's happen here. Here is the code and code-behind and Javascript.

Here's the error: 


Here's my front-code:

<%@ Page Language="VB" MasterPageFile="~/masterpages/mpSqueletton.master" AutoEventWireup="false" CodeFile="frmAdmGestSocietes.aspx.vb" Inherits="adm_frmAdmGestSocietes" title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
<script type="text/javascript" language="javascript">    
        function uploadError(sender,args)
          document.getElementById("<%= lblStatus.ClientID %>").innerText = args.get_fileName(), "<span style='color:red;'>" + args.get_errorMes

AsyncPostBackTrigger doesn't work on server..


 I am new to asp.net and ajax. I have a problem while using update panel.
I have a tabcontainer with 3-4 tab panels. Inside one tab panel there is a cancel button. What i want to do is to when i hit cancel button in code behind i change active tab index to 0 so that tabcontainer shows first tab panel. I have update panel around tab container. This works at my localhost. But on server its behavior is very random. Sometimes it works sometime it doesn't. Unfortunately I am not able to debug it also. I don't know how to debug code on server. As on localhost it works correctly so I am kind of stuck. 

Asyncfileupload doesn't work in webusercontrol

I'm having a problem with a Webusercontrol that has an asyncfileupload control. My websusercontrol is being loaded in a placeholder control that's wrapped by an updatepanel.Due to asyncpostback, I have to load and clear the placeholder's controls. The webusercontrol works flawlessly, except the asyncfileupload, which doesn't want to upload at all. I can assure that the code is without error, because I used to have the webusercontrol running as an *.aspx site. I guess that the problem is the fact that the control has to be cleared and reloaded with every asyncpostback ?

logoff doesn't work through windows service

Dear Friends, I am facing this problem on Windows 2003 and 2008 Server. On XP it works fine. I have written and Windows Service that takes receives the command and executes tasks such as Logoff, Shutdown, etc. All the commands except Logoff works fine. I tried following ways to perform the Logoff. However it didnt work. Try 1:                 Process.Start("shutdown", "-l"); Try 2:     [DllImport("user32.dll")]     public static extern int ExitWindowsEx(int uFlags, int dwReason);     ExitWindowsEx(0, 0); Try 3:     Process _currentProcess = new Process();                _currentProcess.StartInfo = new ProcessStartInfo("shutdown", "-l -f");                _currentProcess.StartInfo.UseShellExecute = false;                 _currentProcess.Start(); Try 4:     Process.Start("logoff.exe", null); If I write a simple C# based applicatin (not Service) it works fine for all the tries that I have made. I am facing this problem only when I put this code

doesn't work (using IIS 6.0)

HiI'm getting errors with an application on our test web server, which has .NET 4.0 installed, when I input HTML into a form.  I get the usual errors of:A potentially dangerous Request.Form value was detected from the clientThis is being caused by the change in .NET 4.0 that disables switching off automatic validation for HTML input.I can fix this on my local development machine by adding the <httpRuntime requestValidationMode="2.0" /> directive to the <system.web> section of my root web.config, and .NET then honours the <pages validateRequest="false" /> directive that's in the same root web.config.  Strangely, I needed to restart IIS on my local machine (which is version 5.1) for this change to work.When I deploy the root web.config to our test server however, I'm still getting the validation errors.  I've tried using run > iisreset, stopping and starting IIS (which is version 6.0 on the test server), and I've even restarted the server to fully clear out .NET.  My application is definitely picking up the new root web.config (I've tested this), however the <httpRuntime requestValidationMode="2.0" /> directive seems to just be ignored.My application is configured as a  .NET 4.0 application on both my local machine and on the test server.  I've tried rebuilding the a

Workflow doesn't work anymore after renaming list

Hi All, I have created a list with the name "helpdesk test". After testing this list i renamed the list to "helpdesk". I did the rename by the list settings.  To this list i attached some workflows, with Sharepoint designer,  that have to start when a new item is created. All worked fine but after the rename the workflows don't work anymore. When i start the workflows manually from the list all works fine. Is there a way to rename a list and let the workflows work as before? Thanks in advance. Laurens.      

Sys.Data.DataContext.saveChanges method doesn't send update to server after DataServiceException ex

Hello,I have a page with a simple form that updates a single record in a table in my database.The database is accessed via WCF Data Services. To load and save data from/to the server, I usethe Sys.Data.DataContext object provided by the ASP.NET AJAX library. When the "save" button on theform is clicked, I use the saveChanges method of the Sys.Data.DataContext object to send all changes to the server.Also, at the server side, I use an interceptor that checks the "Price" fields of the record, and throws a DataServiceException exception when the contents of the field is a negative number.Both the JavaScript and the interceptor (in C#) are copied below.Here is the interesting thing:When I enter a negative price in the form, the interceptor throws the exception and my form shows an error message. Good.However, if I then make one of the other fields in the form a bit shorter (for example from "abcd" to "abc"),the saveChanges method doesn't send the data to the server. But it does call the success callback that I passed in to saveChanges, creating the impressionthat the data has been saved. This happens while the Price field is still negative. I used Fiddler to make sure thatno message is sent to the server. Also, the interceptor doesn't get executed.The weird thing is that if I make one of the fields a bit longer instead (for example &q

WCF WebGet method doesn't work from browser

I'm trying to operate a WCF Method from the browser, i opened a basic WCF Project and added the Webget attribute, my interface is this: [ServiceContract] public interface IService1 { [WebGet(UriTemplate = "GetData?value={value}", BodyStyle = WebMessageBodyStyle.Bare)] [OperationContract] string GetData(int value); [OperationContract] CompositeType GetDataUsingDataContract(CompositeType composite); // TODO: Add your service operations here } and i'm inserting the following URL in the Browser: http://localhost:3122/Service1.svc/GetData?value=3 i get "The webpage cannot be found" there must be missing something in my configuration , what do i have to add ? this is my configuration : <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing

Form in iframe doesn't work.

I have put a form into an iframe. It is sent from another website to the php page on the site which has the iframe. Upon clicking the submit button nothing happens. Just a quick flash of the green page load bar. Why is this happening? I have spend hours on this...<%@ Page Language="VB" AutoEventWireup="false" EnableEventValidation="true" CodeFile="adv_links_addbycustomer.aspx.vb" Inherits="users_adv_links_addbycustomer" title="" %> <html> <head runat="server"> <title></title> <script type="text/javascript"> function copy() { var sel = document.getElementById("DropDownList1"); var text = sel.options[sel.selectedIndex].value; // Assigning selected value of DropDownList to a hidden TextArea holdtext.innerText = text; // Creating text range from hidden TextArea's content CopiedTxt = holdtext.createTextRange(); // Copying the text range to clipboard CopiedTxt.execCommand("Copy"); // out = parent.document.getElementById("web_recip"); out = document.getElementById("Textbox6"); out.value = text + "

Redirecting a view doesn't work

I have the following class that I have all my controllers inherit from:  using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Security.Principal; using System.Web; using System.Web.Mvc; using System.Web.Routing; using System.Web.Security; using LMWebUI.Models; using LMWebUI.Components; namespace LMWebUI.Controllers { public class BaseController : Controller { private UserSettings _currentUser = null; private HttpContextBase _currentContext = null; public UserSettings CurrentUser { get { if (_currentUser == null) _currentUser = UserHelper.GetUser(_currentContext); return _currentUser; } } public string CurrentController { get { return Utility.LastSplit(ToString(), '.'); } } public void SaveUser() { UserHelper.SaveSettings(this.HttpContext, CurrentUser); } protected override void Execute(RequestContext requestContext) { _currentContext = requestContext.HttpContext; if (Utility.FixNull(requestContext.HttpContext.Request.QueryString["noScript"], "") == "true") { CurrentUser.ScriptingMode = UserSettings.ScriptMode.NoScript; } else { if (CurrentUser.ScriptingMode == UserSettings.ScriptMode.ScriptDetection && Utility.ReadCookie(requestContext.HttpContext.Request.Cookies, "HasScri

textbox AutoComplete not work in XP and missing data

When I use the application in XP, auto complete mssing some data~ Here is some of data, IRC-3100 IRC-3200 IRC-5180 when I type "IRC" in the textbox, the fellow didn't show and when I type "IRC-", only IRC-3100 show this issues only occur in XP and window 7 is OK. I don't know why, please help here us the code I use to add autocomplete source~   AutoCompleteStringCollection collection = new AutoCompleteStringCollection();   PropertyInfo ppty = typeof(SOURCE).GetProperty(displayProperty);   foreach (SOURCE s in sources) {   collection.Add(value.ToString()); }   else { collection.Add( string.Empty); } } box.AutoCompleteCustomSource = collection; box.AutoCompleteSource = AutoCompleteSource.CustomSource; box.AutoCompleteMode = AutoCompleteMode.Suggest;        ClarkC
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend