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

Top 5 Contributors of the Month
Post New Web Links

Strange results with MaskedEditExtender

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net

I've inherited a web project from another company, and I'm having a weird issue with a phone number mask.

If the ClearMaskOnLostFocus is "true", I lose the mask in the edit field (this is a editing screen for an existing

record). If set to false, the mask is present, but the leading digit is truncated, and will write back to the DB

an incorrect number if submitted, with that leading "_".

True = 8885551212


The DB field a a varchar(20) -- don't ask me why.

<asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server"
                                            ClearMaskOnLostFocus="true" MaskType="Number"
                                            Enabled="True" Mask="(999) 999-9999"

View Complete Post

More Related Resource Links

Sharepoint Name - DNS Alias Strange results

I have a Sharepoint server called SVR-SPOINT2010 which hosts our internal Intranet. I have two DNS entries for this server with A Records for Portal2 and Intranet, so http://intranet and http://portal2 aswell as http://svr-spoint2010 all bring up the Intranet. If I goto a subsite (ie. /IT) and select 'Site Actions'  'View all site content' it shows me the site content from the root of the Intranet, as opposed to from the /IT site. Using the DNS names, If I goto a library on any of the subsites and click on the name of the View at the top of the screen to change the views none work. If I select List then Edit View I get an error that the view doesn;t exist. However using the original server name (http://svr-spoint2010) the 'View all content' and the Views all work correctly. It seems that internally to harepoint 2010 it only works with the originally configured server name and not with any DNS Alias names. Does anyone know how we can change it so that it works with the DNS Alias names correctly. Cheers Ian

Strange results in SSRS query to Cube


I have discoverred a strange issue when running a MDX query from SSRS 2005. The (All) member of a dimension is comming back as "(null)" instead of "All". The identical query run from SSMS produces the correct results. Some thing to mention is that we are in a phase for the next few days where there are no fact records in my cube (essentially no data, but dimensions are populated). Below is my Query. The problem is with the Subscriber dimension. FYI - I am using SSAS 2005 with SSRS 2005
 SELECT { [Measures].[Total Volume In Bytes]} ON COLUMNS, 
  ({[Subscriber].[Role].Members } * [Traffic Class].[On Off].[On Off].Members) ON ROWS
from [Cube Name] 
Below is the result (correct) from SSMS
    Total Volume In Bytes

Strange Flat File results


OK, I am not even sure I can explain this let alone know what is going on.

SQL 2008 enterprise, 64 bit.

We have a stored procedure (no changes between working and not working).

Running this against the same server file folder, same security credentials, from the BI tool, is just fine. When run from a SQL server job, results as below.

SSIS job basically execs this stored procedure, which just selects and formats the data.

The SSIS package creates a CSV file on a Win. Server.

All of a sudden (I know there is no all of a sudden) it creates this CSV file as such:


Instead of as such:



I've tried a number of things, and like I said it works on my PC within the VS.


Ideas on either fixing it or troubleshooting it?

No search results and strange error in Application log


I have a Sharepoint Foundation installation on a single server with a SQL 2008 R2 express databse engine. I've configured the Sharepoint Foundation Search service via the Central Administration and I have connected the WSS_Content database to the Search Server via the Central Administration.

After the configuration was done I have manually started the timer job both through the Central Admin interface and also via the Command line through the stsadm tool. Even though the job have finished I get no hits on the site collection when searching for words I know are there.

However,  in the Event Viewer I can see the following warning in the Appication log:

A database error occurred. Source: Microsoft OLE DB Provider for SQL Server Code: 14 occurred 4097 time(s) Description: [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
Anyone have any ideas if the above message is the problem or if I have forgot some crucial information.

Strange Photo upload problem


I'm working project it's live on shared hosting

we'er uploading photos to a file on the server everything works fine the photo is resized renamed and sent to the folder

the upload page returns the thumbnail and the full size photo it's there all the photos have to be approved by an admin

twice now after they have been approved they disapear I checked the folder they are not there could there be anywhere

on the server they could get hung up before they go into the folder I have it setup so when you delete the data base entry it deletes the photo from the folder othe than that you need to open the folder and delete the photo this has hapened twice now I tried to recreate it with no luck

thaks for your help in advance

Need Syntax To Make Results of LINQ Union Return Non-Generic Type



I have the below SQL which works just fine:

SELECT     Message, CreateDate, AccountId, AlertTypeId
FROM       dbo.Alerts
SELECT     TOP (100) PERCENT Status, CreateDate, AccountId,
                          (SELECT     10 AS Expr1) AS AlertTypeId
FROM         dbo.StatusUpdates
WHERE AccountId = PassedInParameter

I have been going about trying to convert the above into a LINQ method and am having problems with return types.
As the above SQL illustrates, I am querying two distinct LINQ tables - Alerts and StatusUpdates -
and then attempting to perform a Union on them. In order to do the union in LINQ, I have to have agreeing types. So, I
am using "var" to make the results of "alerts" and "updates" generic before the union.  

public IList GetStatusUpdatesAsAlertsByAccountId<T>(Int32 accountId)
            using (WorkbookDataContext dc = _conn.GetCont

sqlDataReader dos not get results


I am trying to run a stored proc from this function. When I run it thorugh the debugger I can see that myReader.HasRows = true and myReader.FieldCount =14.

But the control does not go in the loop while (myReader.Read()) where I am trying to read Version field returned by the stored proc.

Pls check me code and suggest correction. Thank You.

private static int Get_CaseInfo(string CaseNum)
            int Ver = 0;
            String myConn = ConfigurationManager.ConnectionStrings["DBConnectionString"].ToString();
            SqlConnection conn = new SqlConnection(myConn);
            SqlCommand cmd = new SqlCommand();
            cmd.CommandType = System.Data.CommandType.Text;

            SqlDataReader myReader = null;
            String stmt1 = "EXEC [REPORTS].[CaseInfoByCaseNo_Get] @CaseNo = '" + CaseNum + "'"; 
            cmd.CommandText = stmt1;
            cmd.Connection = conn;
                myReader = cmd.ExecuteReader();
                while (myReader.Read())
                    Ver = (int)myReader["Version"];

            catch (Exception)
            return Ver;         

displaying xsl results in browser


Hi guys,

How can I test what my xsl spits out in the browser, rather than just viewing the xsl itself?


How to display a count of search results with keywords in a label?


Sorry for a basic post here; I am very new to VB!

I am currently building a search page, which includes a textbox and two drop-down lists, a search button, and a datagrid. If results are found and displayed, I would like a label to display:

(e.g.) "24 results found for 'blue sky clouds' "

...where the integer represents the results count, and the keywords and/or drop-down list selections are included in the string.

If no results are found I would like the label to display:

(e.g.) "No results were found that match your selection. Please try again"

I would also like the label to be invisible until a search occurs.

Thanks in advance!

SharePoint Security: Trim SharePoint Search Results for Better Security


SharePoint search may return too much information, causing data security problems. Learn how to use the custom security trimmer to ensure users see only the documents they have permission to view.

Ashley Elenjickal, Pooja Harjani

MSDN Magazine July 2010

{ End Bracket }: Election Results Even Voters Can Trust


Surprisingly, cryptography can be applied to the electoral process to allow every individual voter to check the integrity of an election tally. Find out how here.

Josh Benaloh

MSDN Magazine June 2008

Share The Load: Report Visual Studio Team System Load Test Results Via A Configurable Web Site


This article discusses a new load test tool in Visual Studio 2005 Team System for performance and stress testing your Web sites, Web services, and other server components. Combined with its handy reporting capabilities, the load test tool provides some powerful options for sharing and managing test results.

Wen Ding

MSDN Magazine June 2006

Test Run: Five Ways to Emit Test Results as XML


The use of XML files in software testing has steadily increased over the past few years. Test case data, test harness configuration information, and test result data are now stored as XML. Recently I was writing some .

Dr. James McCaffrey

MSDN Magazine June 2006

How can I prioritise search results to show where document metadata has a hit first and then where t


When my users run a search against a site with a bunch of document libraries they will often search for terms that are in the title of the doc, if they do know the title they will put that in. What I would like to do is have the results ordered such that if any hits are on the document metadata (eg Title) then they are presented first and any results that are from hits on the content of the documents are presented later.

So, if they get the title spot on in their search query that document will appear first .... if they don't get it right then the likelyhood is that the title is something like what they entered so similar titled docs are presented first and then those with matching content ....

How can I achieve this?


No Results matching your search were found. WSS 3.0


I've got one sharepoint 3.0 site, which is a hostNamedSiteCollection which won't return any results when we search it - searching the entire site or a single list both produce the same "no results matching your search were found".
The site uses Windows Authentication.  We have no Alternate Access Mappings set up. It is regular HTTP
I've added test content to other sites housed in the same Web Application and searched - that new data is appearing in the results.
I did a backup using STSADM and restored the site to my dev server (as both a hostNamedSiteCollection & a regular site collection) - searches return results just fine.
I deleted the site from the prod server and restored it (into a different content database even!) from a backup  I made with STSADM - no results are returned.
I restored the site to the same web application as a Standard site (http://webapp/sites/sitename) (NOT a host named site collection) and results ARE returned.

I've looked at the trace logs & application logs on the server, but can't find any errors that I can tell might be related..

This is the only site I've ever seen have this problem.  We have plenty of other hostNamedSiteCollections and search is working fine on them.


Exclude the author name from the search results



How can i prevent author's name to appear in search results. shows many results when i search the "author.name".

I want, MOSS 2007 Search get results from the content only the user sees.


FAST Search for SP2010 scope setting works but not getting results.



I am trying this from last two days , but it does not work. I have created two scopes for FAST Search Query SSA , they appear in search center , but I am not getting any results back. I see them being fired in the FAST query log.

First one is a simple one:

New-SPEnterpriseSearchQueryScope -SearchApplication "FAST Query SSA" -Name DCO -Description "All DCO Documents" -DisplayInAdminUI 1 -ExtendedSearchFilter "ContentSource:DCO"

Content source is a managed property. and i can just query "contentsource:dco" from the text box which gives me results.

When I fire the query i see it in FAST Search query log

"GET /cgi-bin/search?qtf_keyword:context=ssgid%3a%3a4d020606-8532-45d8-b09a-db11283cccb4%7cSPS-Location%3a%3a%7cSPS-Responsibility%3a%2c%3a%7c&rpf_navigation:hits=50&rpf_navigation:enabled=True&spell=suggest&qtf_parsekw:timezone=10&type=kwall&qtf_teaser:dynlength=185&resubmitflags=8192&language=en&query=CASHIERING&sortby=%2bdefault&qtf_lemmatize=True&offset=0&version=

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