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


Top 5 Contributors of the Month
Imran Ghani
Post New Web Links

weird behavior in SSMS - backslash (\) is getting displayed as (#)

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :Sql Server
 

I'm experiencing some weird behavior in SSMS for SS2008.  When I create a new query and type the backslash (\) key a pound(#) symbol is displayed instead in the query window.  I've never experienced this behavior in SSMS 2005 before.  This is the first time I'm using SSMS 2008.  I work with a few developers who also use SSMS 2008 and they have no idea about this either.  Any idea whaat might be causing this behavior and any idea how I can fix this?  I'm using Windows 7 and the backslash (\) symbol displays as expected in other applications (Notepad, VS2010, etc). 

Please help!




View Complete Post


More Related Resource Links

weird behavior in SSMS - backslash (\) displays as (#) in query editor

  

I'm experiencing some weird behavior in SSMS for SS2008.  When I create a new query and type the backslash (\) key a pound(#) symbol is displayed instead in the query window.  I've never experienced this behavior in SSMS 2005 before.  This is the first time I'm using SSMS 2008.  I work with a few developers who also use SSMS 2008 and they have no idea about this either.  Any idea whaat might be causing this behavior and any idea how I can fix this?  I'm using Windows 7 and the backslash (\) symbol displays as expected in other applications (Notepad, VS2010, etc). 

Please help!

 


Weird behavior

  
I've made this "Minify" class that inherits from MemoryStream and I want to use it to minimise the amount of whitespace in for example css and javascript files. To begin with I'm not doing anything complex just a simple replace.using System;using System.Collections.Generic;using System.Linq;using System.IO;using System.Text;using System.Web;using System.Text.RegularExpressions;namespace Output{    public class Minify : MemoryStream    {        private Stream stream = null;        public Minify(Stream stream)        {            this.stream = stream;        }        public override void Write(byte[] buffer, int offset, int count)        {            string content = UTF8Encoding.UTF8.GetString(buffer);            content = LimitWhitespace(content);            stream.Write(UTF8Encoding.UTF8.GetBytes(content), offset, UTF8Encoding.UTF8.GetByteCount(content));        } &nbs

EXPERT: avoiding weird refresh behavior of Eval method in a tabpanel

  
I have this control in a detailsview:<asp:DropDownList ID="ddlEventStartDay" SelectedValue='<%#Cdate(Eval("startdate")).Day %>' CssClass="textbox" runat="server">    <asp:ListItem Value="1" Text="01" />    <asp:ListItem Value="2" Text="02" />    <asp:ListItem Value="3" Text="03" />    <asp:ListItem Value="4" Text="04" />    <asp:ListItem Value="5" Text="05" />    <asp:ListItem Value="6" Text="06" />    <asp:ListItem Value="7" Text="07" />    <asp:ListItem Value="8" Text="08" />    <asp:ListItem Value="9" Text="09" />    <asp:ListItem Value="10" Text="10" />    <asp:ListItem Value="11" Text="11" />    <asp:ListItem Value="12" Text="12" />    <asp:ListItem Value="13" Text="13" />    <asp:ListItem Value="14" Text="14" />    <asp:ListItem Val

weird Rating Control behavior

  
Hi folks! :)I have Rating control on my page. The page is a subpage of nested master page. On that page is updatepanel and wizard with TemplatedWizardStep inside it and inside TemplatedWizardStep is Rating Control.Master.Page -> NestedMaster.Page -> Content.PageI allso have googlemap inside that wizard(on different step) so i need to register google initialize() for it to work.So by registering googlemap like example below Rating Control freezes. Private Sub ScriptManager1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ScriptManager1.Load ScriptManager.RegisterStartupScript(Page, Page.GetType(), "onload", "initialize()", True) End Sub But if i include script tags in string like example below, Rating Control does not freeze. Private Sub ScriptManager1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ScriptManager1.Load ScriptManager.RegisterStartupScript(Page, Page.GetType(), "onload", "<script>initialize()</script>", False) End Sub Everythnig works, but i wonder, WHY :) Why is Rating Control freezing in sample1?

Weird Thread.CurrentPrincipal behavior

  
msdn has a code sample illustrating the use of SetPrincipalPolicy. I copy the code and the output below:

using System;
using System.Security.Principal;
using System.Threading;

class ADPrincipal
{
    static void Main(string[] args)
    {
        // Create a new thread with a generic principal.
        Thread t = new Thread(new ThreadStart(PrintPrincipalInformation));
        t.Start();
        t.Join();

        // Set the principal policy to WindowsPrincipal.
        AppDomain currentDomain = AppDomain.CurrentDomain;
        currentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
           
        // The new thread will have a Windows principal representing the
        // current user.
        t = new Thread(new ThreadStart(PrintPrincipalInformation));
        t.Start();
        t.Join();

Weird application behavior -- Action required to trigger service response otherwise the application

  

Hi,

I am a WCF beginner and is trying out with a basic host service with callbacks to the client.

My code works wonders if my client app is a console.exe but when I transferred the code to a Windows Form app, the application will freeze.  But if I right click on the form window task bar, the code suddenly goes through and it would work...

Is there anything wrong with this?

The service is hosted on IIS

Here is my Service code:

 

[ServiceContract(CallbackContract = typeof
(IChatCallBack))]
 public
 interface
 IChat
 {
  [OperationContract]
  void
 Talk(string
 msg);
  }

[ServiceContract]
 public
 interface
 IChatCallBack
 {
  [OperationContract]
  void
 OnCallBack(string
 msg);
  }

 

Implementation:

 

[ServiceBehavior(
  ConcurrencyMode = ConcurrencyMode.Reentrant)]
 public
 class
 Chat : IChat
 {

  

Package using Recordset variable showing weird behavior

  

Hi,

I am using a recordset variable in my package... say.. User::VarRecordset(Scope: Package)

I am first filling the User::VarRecordset using a Recordset Destination. Then, I am using this Variable in a For Each Loop..

The package works fine in BIDS. Even on Making a File system Deployment, It works on My machine, and some others too.

But on Some machines, the Execution Fails, showing an Error, Package Variable "User::VarRecordset" not Found in List of Variables..

The execution results do not show any error while putting data into "User::VarRecordset" . But FOR EACH Loop Fails with that Error..

 

Unable to find any reason, why it works well on some machines and Fails on Some.

My Machine is a 32 bit one...

 

Any clue or help to this requested...

 



Custom Editing Behavior for DataGridView TextBox Columns

  
For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Run Button Behavior: Suggestion/Bug

  

Note: This could be a bug or considered as suggestion. I am not looking for solution.


1: I have ImageWatermark.cshtml open and currently in focus.

2: I have Photo1.jpg selected in left Files workspace.

3: Now if I Click "Run", instead of opening ImageWatermark.cshtml it trys to open Photo1.jpg and it fails.

So ideally I would expect the "open file (ImageWatermark.cshtml) to run rather than running the selection from Workspace.


Word Automation - Multiple DCOM Errors/Behavior

  
Before I get started, I already know that Microsoft does not support and highly discourages server-based MS Office automation.  I've read a multitude of posts and smarmy "*wink*, here's a link" replies, so I'm looking for actual help here, not condescending reprimands.

That notwithstanding, here is my problem.  I have developed a simple method that will open a local Word document, modify some header information, and then save the document as a new file.  As expected, it works great as a console/windows app, but as soon as I went to ASP.NET, DCOM jacked my world up when accessing the app remotely from a different domain account (that has access to the ASP.NET app.  For reference, my method is shown below:

  

1    public static string ModifyAndSaveBuildDocument(string localFilePath, BuildDocumentType docType, string buildNumber, DateTime buildDate, string projectName)
2            {
3                try
4                {
5                    ProjectConfiguration config = (ProjectConfiguration)ConfigurationManager.GetSection("ProjectConfiguration");
6    

Weird security configuration error message

  

Recently something has gone wrong with our website so that whenever you try to access an aspx file, it shows the following error:

 

Server Error in '/RALSWeb' 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.

Parser Error Message: Access is denied: 'RalsWeb'.

Source Error:

 
Line 256:                <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 257:                <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 258:                <add assembly="*"/>
Line 259:            </assemblies>

ModalPopup/UpdatePanel from codebehind, inconsistent behavior onClick

  

First post bear with me please:


I have a simple form with a list of linkbuttons, each fires the same onclick event which sets an indicator image.  I have a dummy button with style="display:none" which I have set as the TargetControlID of the modal.

onClick event from the imagebutton, the modal is shown via modal.Show().  The cancel button inside the modalpopup fires an event which turns off the indicator image and hides the modal via modal.Hide(). 

The events fire perfectly, it's very simple!  Although after doing some testing I noticed the modalpopup is not presented after the 6-10th cycle of clicking the open event, then clicking cancel.  The grey background appears but it is behind the main panel and the modal is either presented behind this or is just simply not displaying. 

I spent hours researching various methods, implemented the CancelControlID to see if it was somehow tied to my call of modal.Hide() that fails.

This occurs with an updatepanel only.  The behaviour is much cleaner this way, so I would hope to be able to implement this.  I have basically eliminated everything but these two events!  Please help


Profile Pictures not displayed in Discussion Board in SharePoint 2007

  
Picture Placeholders are displayed instead of Profile Images in Discussion boards in MOSS 2007 but when you click on the user, their pictures appeared in MySites, also with Search People. How to fix this?!

Announcements with Image in Body, displayed via CQWP

  

I feel like I've set this up to be as difficult as possible for my non-programmer users ;) There's GOT to be a better way. Any guidance much appreciated.

I have an Announcements-type list on a NEWS subsite, with fields for Title, Body, and Summary (body with image plus first few sentences of Body). I have a separate Picture Library to store the images they'll use in the Body and Summary.

The Title and Summary are displayed on the Site Collection HOME using a CQWP.

My instructions for users are as follows

1. place image in http://site/subsite/imagelibrary/Forms/AllItems.aspx
2. right click on image and select Copy
3. go to http://site/subsite/announcementspage.aspx
4. Click New > New Item.
5. In "Body", click CTRL+V.
6. Add Title, Body, and Summary text.
7. In HTML, add align="left" insite <img> tag.

Adding to http://site/subsite/announcementspage.aspx automatically gets picked up by the CQWP on the home page.

Like I said, it's pretty ugly, esp considering that my users don't know HTML. Recommendations warmly appreciated.


MVC2 Music Store - How to get store controller - store.aspx working {genre names displayed}

  

STORE.aspx

<p>Select from <%: Model.NumberOfGenres %> genres:</p><ul> <% foreach (string genreName in Model.Genres) { %>

<li> <%: genreName %> </li>

<% } %>

</ul>

MOST PEOPLE WILL BE USING VISUAL STUDIO 2008 sp1, to get this to work change the <%:, ONLY WITH SEMI COLONS, TO <%=


Weird "string;#" in combobox

  

Ok, while I am digging and digging myself into the world that's called Sharepoint I come to the next challenge.

 

I have two lists Projects List and Project Issues. They both have an id field (which is not the ID field of the record) and a title. I created two calculated fields for both of the tables which combines the title and the number for displaying in other pages.

 

example:

Projects List:

ProjectID: 2008-001

Project Name: First Project in 2008

Display Name (which is the calculated field): 2008-001 First Project in 2008

 

The calculated field formula is: =[ProjectID]&" "&[Project Name]

The field returns a string.

 

I also have a Worksheet list where my workers have to fill in their working hours. In this list I have two lookup fields. O

Categories: 
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