.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

Very strange error reported in View (Might be a bug in VS2k8?)

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :ASP.Net


As I say in the title of my post this "may" be a bug in VS2k8 Pro, I have seen these strange little things happen before but whenever you utter the word "bug" people tend to get defensive, so I say it "may" be ;)

Basically I have two List(Of MyOwnClass) and I am going to enumerate through these lists on my view.

I add the Import statement to the top of my view so that my custom class can be used on it.

I add a very simple loop,

                    <%For Each CPDCourse As Download In CType(ViewData("CPDAvailable"), List(Of Download))%>
                        <td style="width:100%">
                            <a href="<%=CPDCourse.URL%>">
                            <a href="<%=CPDCourse.URL%>">
                                <img style="border:none;" alt="View Image" src="../../Content/Images/digitaltraining/view.jpg" />

View Complete Post

More Related Resource Links

Custom Control Design view error



I have created a custom control from scratch and it works fine as in you can build the project that uses it and it works fine at runtime. Problem is when you go to design view the control shows an error in the place of where the control should be rendered.

Error: '<SomeValue>' Could not be set to '<SomeProperty>'

This shows up on all my custom set properties. These properties are created as basic as possible. I can give the properties values in Source view and run the app just fine. I can even add a Onclick event. If I don't set any custom properties the control will render fine in Design view. It's only when I set a value to a custom property.

Property Code Example:

public string Text
                string ret = "";
                object obj = ViewState["Text"];
                if (obj != null)
                    ret = obj.ToString();
                return ret;
                ViewState["Text"] = value;

I've even removed the Category and Description tags with no difference.

I don't know if what I said makes sens, but I hope it

show data in grid view error Arithmetic operation resulted in an overflow.



i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 

strange web service error



I wrote a small little vb.net app that should connect to a MS search server 2010 web service.


I added the web reference, which worked fine, but whenever I run the code, I get this strange error:




I Googled it, but found very little info on it.

Can anyone make sense of it?



Data Source View Gives incorrect Error--Different Data Type

Hi, I'm creating a report model (2008 R2).  I am trying to create a relationship between two tables.  One FKs to another--same name and type (tinyint) columns.  But the Data Source View editor doesn't allow this, giving the message "...source and destination column have different data types".  But the columns are the same types.  I ahd this once before  acouple of years ago and don't remember how I got around it. Does anyong have ideas?  

Strange: Parser Error: Could not load type '_Default'.

i donot have any intentions till now of uploading my web project and just started working on MS VS9.0I made a simple Linq based project (CODE BEHIND used)AS i compiled it i got Parser Error: Could not load type '_Default'.I figured out 2 solutions for this(WHICH I CUDNT FIND IN MANY FORUMS). But nt sure...why doing them solves the problem.SOL 1)The easy way out is to uncheck "place the code in the seperate file" while adding an item.and then adding the statement <%@ Import Namespace="System.Linq" %> on top of ur aspx as in:<%@ Page Language="C#" %><%@ Import Namespace="System.Linq" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">---FURTHER CODE----Sol2)If  we deal whith the CODE behind technique....and have already used "USING System.Linq; in the definition,I found a funny solution to the problem.In ur default page...the top line is<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="<namespace>.<class>" %>Now if i change the keyword from CodeBehind to CodeFile as in:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="<namespace>.<class>

Strange Problem - SSIS Fails with "Syntax error, permission violation, or other nonspecific error".

Hello, I have a strange issue while I am deploying a package to one of the environment server. I have 2 XML Source, in the DataFlow, and one will extracted based on a value of variable that is passed from run time (package is executed from a Job) and other will be extracted all time. The next Step I have is a Execute SQL Task in ControlFlow wihich will execute after DataFlow. This has 2 input parameters and some SQL query that uses the param. Now this one fail on the target environment with below error: failed with the following error: "Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. I got the error when I did a SSIS Text File Log. Note: If I run the package in BIDS with the same XML files it work. Also when I deploy the package to my Dev Server it works. When I compare the Dev DB with the target environment DB - Both are same. The Service Acount has permission - as I can see the DataFlow task completed. Another Point: The XML Load Data Flow that executes based on the Variable Value does not execute on target environment, even if the value is passed as "True" (It is Boolean Type) But this variable is NOT an input for the Execute SQL task that fails. I am not sure w

The specified view is invalid error when browsing for images

Hello All, Currently using MOSS 2007 publishing site and using the CMS elements to publish content to the web.  One of our users is experiencing a strange problem whereby when they try to insert an image into the Sharepoint content editor using the Insert Picture functionality they get the following error when trying to browse to an image: The specified view is invalid.   at Microsoft.Sharepoint.SPViewCollection.get_Item(String strDisplayName) at Microsoft.Sharepoint.Publishing.Internal.States.AssetPickerDetailState.InitGridView(GridView grid) at Microsoft.Sharepoint.Publishing.Internal.States.AssetPickerDetailState.Configure(SMObjectList objectlist) at Microsoft.Sharepoint.Publishing.Internal.WebControls.SMObjectList.Handle_LoadCompleteEvent(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Page.OnLoadComplete(EventArgs e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Only one user is experiencing this problem, others are fine. Does anyone have ANY ideas what is causing this issue or how to fix it? Thanks

very strange sql server error

I have a script that creates a database and sets up everything required for merge replication. Merge replication is pull with a single parameterized row filter based on HOST_NAME() and joins on other tables. It works perfectly. I recently decided to drop all my identity columns and use rowguid's instead.   I modified my script by only changing the primary key column definitions, basicaly I went from "[Id] [int] NOT FOR REPLICATION IDENTITY (1,1) NOT NULL PRIMARY KEY CLUSTERED" to "[Id] [uniqueidentifier] ROWGUIDCOL NOT NULL DEFAULT NEWSEQUENTIALID() PRIMARY KEY CLUSTERED".   The script still works fine. Everything is executed succesfully and even the snapshot agent finishes it's job.   But the problem is, that when I want to create a partition I get the following error:   A value for the parameter @host_name was specified, but no articles in the publication use HOST_NAME() for parameterized filtering. (.Net SqlClient Data Provider). Microsoft Sql Server, Error: 20672   If I try to synchronize a subscription then the subscription is created succesfully, but I get an error while synchronizing stating: Merge agent was unable to determine if another subscription exists for the current partition.   And yes, I do have my filters set up 100% correctly.   The funny thing is, if I create the publication via Management Studio, then I don't get that error. But if I

Data binding - strange error message

Hi, I am getting an inexplicable error message on attempting to run a simple WPF data binding application based on an example with video downloaded from MSDN. VB / VS 2008 Pro / .NET 3.5 SP1 / XP SP3 The error (ex.Message) is "The specified registry key does not exist" in response to an attempt to define the data context to populate a listbox, but no explicit registry operation is involved at all. The code is: Private taTable1 As New D1DataSetTableAdapters.Table1TableAdapter Private D1Data As New D1DataSet . . . Try     Me.taTable1.Fill(Me.D1Data.Table1)     Me.DataContext = Me.D1Data.Table1        ' this statement generates the exception Catch ex As Exception The error message is giving no obvious clue.  What is going on? P.S. The MSDN sample application uses the following code to sort the listbox items: Me.DataContext = From p In Me.dsProduct.Product Order By p.Name This construct does not work when I try to use it - VS 2008 reports that "'Name' is not a member of 'System.Data.DataRow'".  How may this error be avoided? JPL

Grid view update error

Server Error in '/WebSite6' Application. Object reference not set to an instance of an object. 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 Error: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:1. Add a "Debug=true" directive at the top of the file that generated the error. Example:   <%@ Page Language="C#" Debug="true" %>or:2) Add the following section to the configuration file of your application:<configuration>    <system.web>        <compilation debug="true"/>    </system.web></configuration> Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.Important: Running applicatio

While trying to view a report in integrated mode i see an unsupported RPL stream error

Trying to deploy a report in integrated mode on MOSS 2007. SQL server version is 2008 R2. I see the following:   ??? ?????????? ? ????м???? ?? ??????? ????????? ??????. ?????????? ?????????????м?? ?????? ?????? RPL: 34.62.1836345404. ??????м?? ??????: 10.3.     Yes i know its in russian. Another fail of Microsoft not being able to see the error codes and strings in english language, makes finding solutions even harder, because first you must find HOW is this called in english, then look for solution. Okay so, i found out that it is actually transalted into: unsupported RPL stream version detected 34.62.1836345404 expected version 10.3 Now, everywhere around the webs they say that this is because my Add-in is out of date and i need new RS addin for MOSS 2007.  But the link is dead!    For example, here http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/61357765-52aa-4085-9ee0-4cb494a6c3ad   @For SQL 2008 R2 together with WSS 3.0 / MOSS 2007, you need the SQL server 2008 november CTP add in:  http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=44bda62c-0cda-4a99-8d0a-d7fe06b39422 But the link is dead and there is no hint as to what happened.   The only valid link i found is this: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=65606fdd-093f-4c

Validation.Error giving strange behavior

I'm seeing some weird behavior with the Validation.Error attached event. I have a textbox bound to an object that implements the IDataErrorInfo interface. The textbox subscribes to the Validation.Error event. What is weird is that when you put the text box into an invalid state, the Validation.Error event gets triggered twice. Under .NET 3.5, the first time ValidationErrorEventArgs.Action == Removed. The second time ValidationErrorEventArgs.Action == Added. Under .NET 4, it's reversed. The first time ValidationErrorEventArgs.Action == Added. The second time ValidationErrorEventArgs.Action == Removed. Why would it be called twice and why would it work differently under .NET 3.5 and .NET 4? I'm trying to implement a validation summary control similar to the one from ASP.NET. There is a solution here: http://codeblitz.wordpress.com/2009/05/12/wpf-validation-summary-control/ but it doesn't work under .NET 4 because in order for it work work, when you put a control into an invalid state, the last call to the Validation.Error event has to be with ValidationErrorEventArgs.Action == Added. Here is my code:   <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplicatio

Strange Repeater Error, Object reference not set, Label not visible etc etc..

Hi Everyone,This is very strange and as of yet I cant seem to get round it, although it is a somewhat easy error to identify it is however becoming very annoying as everything I try doesn't seem to work...The repeater displays results for upcoming subscribers birthdays and after their day and month ("dd/mm/") I have a label to display the current year. This causes the old error of: Object reference not set to an instance of an object. 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 Error:  Line 55: Label lblYear = e.Item.FindControl("lblYear") as Label;Line 56: Line 57: lblYear.Text = DateTime.Now.Year.ToString();Line 58: }Line 59: As you can see the object is set correctly - The ASPX is below, for saving time on reading etc I've posted the repeater script only and not the whole page, although I can do if needs be.I've tried a number of things with subtle differences but to no avail: with Literal, same error - Tried inserting the year directly via <%#((system.datetime).now.year.tostring())%> or something to that effect, this also doesnt

Performancepoint designer error - Update View Failed

I've created a scorecard that uses dynamic members.   I'm no longer able to design it. When I click on 'Update' to retrieve the scorecard I get the following error:   The last attempt to update this view failed. Try retireving the view again by pressing Update in the Edit tab. If you are still not able to retrieve it, contact your administrator. Error Details: An unexpected system error has occured. Additional details have been logged for your administrator.   The event log says: An unexpected error occurred.  Error 56822. Exception details: System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (100000000) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. ---> System.ServiceModel.QuotaExceededException: The maximum message size quota for incoming messages (100000000) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.    --- End of inner exception stack trace --- Server stack trace:    at System.ServiceModel.Channels.HttpInput.ThrowMaxReceivedMessageSizeExceeded()    at System.ServiceModel.Channels.HttpInput.GetMessageBuffer()    at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)    at System.S

save codes error in form view tool

hi i use this code in form view(at INSERT button)  for save data into SQL serverInsertCommand="INSERT INTO Debtor (AccNo, CompanyName, Desc2, RegisterNo, Address1, Address2, Address3, Address4, PostCode, AreaCode, Phone1, Phone2, Fax1, Fax2, NatureOfBusiness, WebURL, EmailAddress, DeliverAddr1, DeliverAddr2, DeliverAddr3, DeliverAddr4, DeliverPostcode, Attention, SalesAgent, DebtorType, DisplayTerm, CreditLimit, CurrencyCode, UDF_Shipvia, UDF_freigh, UDF_SourceIn, UDF_ProductEnq)VALUES ( @AccNo, @CompanyName, @Desc2, @RegisterNo, @Address1, @Address2, @Address3, @Address4, @PostCode, @AreaCode, @Phone1, @Phone2, @Fax1, @Fax2, @NatureOfBusiness, @WebURL, @EmailAddress, @DeliverAddr1, @DeliverAddr2, @DeliverAddr3, @DeliverAddr4, @DeliverPostcode, @Attention, @SalesAgent, @DebtorType, @DisplayTerm, @CreditLimit, @CurrencyCode, @UDF_Shipvia, @UDF_freigh, @UDF_SourceIn, @UDF_ProductEnq)"> it's show error at:-        Must declare the scalar variable "@AccNo".if i run the application without add (AccNo,....)VALUES(@AccNo) into above codes it's working good..AccNo is into drop down list control..

Error message in opening a view after Replication server restored

Hi, Yesterday Replication was broken as Publisher was down. After it was restored, I tried to open a view in Subscriber and I get the following error message [Microsoft] [ODBC SQL Server Driver] [SQL Server] Login failed for user 'Repl admin'   Any suggestions to get around this problem.   Thanks in advance -Jaya

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Access

Hi,I am importing Excel 2007 file into SqlServer 2005 (Sqlexpress). The office 2007 is not installed in the machine. I have downloaded and installed "AccessDatabaseEngine". When I execute following statement SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=D:\File1.xlsx', 'SELECT * FROM [Sheet1$]');The following error is comming:Msg 7399, Level 16, State 1, Line 1The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Access denied.Msg 7350, Level 16, State 2, Line 1Cannot get the column information from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".Can any one suggest what should I do to resolve?Thanks,Parmeshthee. Learning .Net 3.5
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