473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

reformatting in visual studio 2005

Hello,

I am trying to find the option VS2K5 that will automatically change

HtmlMeta hm=new HtmlMeta(); or HtmlMeta hm = new HtmlMeta();

to HtmlMeta hm = new HtmlMeta();

What I would like to do is have extra spaces taken out or added in where
appropriate. I can do this in vb, but am having problems with c#.

Thanks, sck10
Aug 10 '06 #1
13 1339
ctrl + k, ctrl + d
"sck10" <sc***@online.nospamwrote in message
news:ug**************@TK2MSFTNGP03.phx.gbl...
Hello,

I am trying to find the option VS2K5 that will automatically change

HtmlMeta hm=new HtmlMeta(); or HtmlMeta hm = new HtmlMeta();

to HtmlMeta hm = new HtmlMeta();

What I would like to do is have extra spaces taken out or added in where
appropriate. I can do this in vb, but am having problems with c#.

Thanks, sck10

Aug 10 '06 #2
Hi Steve,

I looked in the option section, but I still can't get it to work. what I
would like is for c# to auto-reformat automatically the same way that vb
does. For example, if I type the following the following: int
AddrFrom=1+2+3

in VB will automatically reformat to: string AddrFrom = 1 + 2 + 3

Maybe it has something to do with "Pretty listing (reformatting) of code" in
vb, but I'm not sure.

Also, I have selected "insert space before and after binary operators" for
c#, but this doesn't seem to do it.

Thanks again, sck10

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:H6**************@TK2MSFTNGXA01.phx.gbl...
Thanks for Muckey's input.

Hi Steve,

As Muckey as mentioned, you can use the "ctrl+k, ctrl+d" or the
"Edit--->Advanced--->Format Document" menu to explicitly do document
formatting. However, I'm wondering whether you've ever changed the IDE's
formatting setting for the C# code. Based on my local environment's
setting, all the automatic code formatting for CS code is turned on in VS
2005. You can check the cs formatting setting in the following location:

** go "Tools-->options" and open the option setting dialog

** in the dialog's left view, choose "Text Editor" node and navigate to
the
"C# ---formatting" sub node, you'll find all the C# related code
formatting setting there. I've attached a screenshot image in this
message(my local VS 2005's setting) for your reference.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

Aug 15 '06 #3
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:gb**************@TK2MSFTNGXA01.phx.gbl...

Please don't attach binaries - this is a text-only newsgroup.

Most people's newsreaders simply strip these off anyway - mine certainly
does...
Aug 16 '06 #4
Thanks you for the advice Mark,

I'll take care next time.

BTW, is small zip package ok for most newsreader?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Aug 16 '06 #5
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Hq**************@TK2MSFTNGXA01.phx.gbl...
BTW, is small zip package ok for most newsreader?
A text-only newsgroup is a text-only newsgroup - that's what "text-only"
means...

My newsreader is set to remove any binary attachment.
Aug 16 '06 #6
Steven,

For as long as I can remember ( and that's a long time ) it's been OK
to send small binaries ( whether zip or images ) to these newsgroups.

The reason for that is that there's no dedicated binaries newsgroups on this news server.

People frown when large binaries are sent ( or when images are sent as bmp,
instead of gif/jpg, for example ) but small binaries are often the best way
to present an easily understood concept.

I wouldn't worry at all about sending small binaries to help explain a point.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Hq**************@TK2MSFTNGXA01.phx.gbl...
Thanks you for the advice Mark,

I'll take care next time.
BTW, is small zip package ok for most newsreader?

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead

Aug 16 '06 #7
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:OW**************@TK2MSFTNGP02.phx.gbl...
I wouldn't worry at all about sending small binaries to help explain a
point.
Except that people whose newsreaders are set to strip them off (for reasons
of security or whatever) will obviously never see them so, for them, they
don't help to explain anything...

Much better is to place the binaries on a public server and provide a
link...
Aug 16 '06 #8
Mark.

You're mistaken.
This is not a text-only newsgroup, like most usenet newsgroups.

There's no newsgroup dedicated to binaries on this server so,
if we don't send binaries here, we have nowhere to send them.

What's frowned on is sending large binaries,or sending images
in a space-consuming format, like bmp, instead of gif/jpg.

But, small binaries are OK.
They've been OK since the newsgroups began operating.

So the servers aren't clogged up, messages are flushed
every couple of months, as are the images, too, so don't worry.

:-)

There's tons of resources which keep the message store's whole history,
like Google Groups, .Net 247 and a host of others, if you wish to do research
beyond the two month flushing threshhold.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message news:eP**************@TK2MSFTNGP06.phx.gbl...
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Hq**************@TK2MSFTNGXA01.phx.gbl...
>BTW, is small zip package ok for most newsreader?

A text-only newsgroup is a text-only newsgroup - that's what "text-only" means...

My newsreader is set to remove any binary attachment.

Aug 16 '06 #9
re:
Much better is to place the binaries on a public server and provide a link...
Mark,

This *is* Microsoft's public newsgroup server... ;-)

We don't have a dedicated binaries newsgroup, and this is not usenet,
where rules like the one you mention do apply because they *do* have binaries ng's.

Believe me, it's OK to send small binaries here.
Naturally, we ask that people be considerate, and not post large binaries.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message news:%2****************@TK2MSFTNGP03.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:OW**************@TK2MSFTNGP02.phx.gbl...
>I wouldn't worry at all about sending small binaries to help explain a point.

Except that people whose newsreaders are set to strip them off (for reasons of security or
whatever) will obviously never see them so, for them, they don't help to explain anything...

Much better is to place the binaries on a public server and provide a link...

Aug 16 '06 #10
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
There's no newsgroup dedicated to binaries on this server so,
if we don't send binaries here, we have nowhere to send them.
??? Put them on a public server and provide a link...
So the servers aren't clogged up, messages are flushed
every couple of months, as are the images, too, so don't worry.
You're totally missing the point. I'm not complaining about binary
attachments from some sort of moral standpoint, and I couldn't care less
about how much space they take... It's just that I and everyone else whose
newsreaders filter them out will never see them!

Was the binary that Steve posted useful / interesting / helpful? I wouldn't
know, you see...
Aug 16 '06 #11
re:
It's just that I and everyone else whose newsreaders filter them out will never see them!
Was the binary that Steve posted useful / interesting / helpful? I wouldn't know, you see...
It was very useful...and saved a lot of verbal explaining,
which is the purpose of posting images ( as long as they're not too large ).

Just because *you* cannot see attachments,
why should everybody else should suffer the lack of them ?

What's it to you ? You don't see attachments, anyway...

You should talk to your network admins so they allow gif and jpg images.
They don't pose a danger to anybody.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message news:%2****************@TK2MSFTNGP04.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>There's no newsgroup dedicated to binaries on this server so,
if we don't send binaries here, we have nowhere to send them.

??? Put them on a public server and provide a link...
>So the servers aren't clogged up, messages are flushed
every couple of months, as are the images, too, so don't worry.

You're totally missing the point. I'm not complaining about binary attachments from some sort of
moral standpoint, and I couldn't care less about how much space they take... It's just that I and
everyone else whose newsreaders filter them out will never see them!

Was the binary that Steve posted useful / interesting / helpful? I wouldn't know, you see...

Aug 16 '06 #12
Thanks all,

Yes, I've ever got that large attachment(over 100k) should be avoid in such
newsgroup. That's why I only attache some small ones now :-). If possible,
I'd rather send any attachement through email to others. Sure, a public
server (http or ftp) should be the best choice, however, I haven't such
storage so far :(

Thanks for your comments.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Aug 16 '06 #13
Thanks Steven,
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:gb**************@TK2MSFTNGXA01.phx.gbl...
Thanks for your reply Steve,

As for the behavior you mentioned below:

===============

For example, if I type the following the following: int
AddrFrom=1+2+3

in VB will automatically reformat to: string AddrFrom = 1 + 2 + 3
===============

In my local environment, when I input the following statement

int addrFrom=1+2+3

and then type ";" to end the statement, the IDE will automatically format
the statement as below:

int addrFrom = 1 + 2 + 3;
Is this the exact behavior you want?
I've rechecked the formatting setting of the C# texteditor in my IDE, in
addition to the three general options on the main "Fomatting" node,
there're many sub formatting options in the "spacing" sub node which
control how the IDE will add space into our c# code statement, I think
this
is the setting which is useful to you.

BTW, can you find a Visual Studio 2005 on other machine in which the C#
formatting works correctly? If so, you can compare the formatting setting
between them.

In addition, Visual Studio 2005 has provide the functionality for
importing
and exporting IDE setting, you can find the following menu item which can
help do IDE settings import/export or reset:

"tools---import and export settings..."

In the popup dialog, you can find three options:

1. export the selected environment settings

2. import selected environment settings

3. reset all settings.

You can try get a setting copy from a machine which works as expect and
import on the problem machine. Also, if you feel necessary I can send you
my exported setting file. You can also consider backup your current
setting
and use "reset all settings" to see whether it works.
Here is a msdn article introducing this setting import/export
functionality:
#Chapter 3: Visual Studio 2005 Integrated Development Environment
http://msdn.microsoft.com/library/en....asp?frame=tru
e#netvbdev03_topic2

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.



Aug 17 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
3
by: Chris Lane | last post by:
Hi, This is super annoying FrontPage like behavior. Does anybody know how I can stop the Visual Studio.NET IDE from reformatting my HTML? Thank You
6
by: Abhishek Srivastava | last post by:
Hello All, I am developing a page which has a complex layout. This layout cannot be made using VS alone, so I have to go into the html view and edit the html myself. The problem is that...
3
by: GrantMagic | last post by:
Appologies if this is a wrong newgroup for this question, but i can't find a visualstudio newgroup (at least not an english one, their is a french and arabic one) Anyways, i have a highly...
3
by: Shapper | last post by:
Hello, I am starting 2 new projects to deliver in January 2006. I want to create them in Asp.Net 2.0 using Visual Studio 2005. All my clients web sites are Visual Studio 2003 projects in...
0
by: fiona | last post by:
Innovasys Ltd., a leader in help authoring and documentation tools, today announced the inclusion of a tailored version of the Innovasys HelpStudio help authoring product, HelpStudio Lite, in the...
8
by: WT | last post by:
Is it normal that Visual Studio sets the PreInit handler for a Page from the OnInit code ? No chance to fire it as OnPreInit is run befor OnInit. ??? CS
3
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.