Home » Microsoft Technologies


Am I wasting my time trying to get divs to render across the display with an assigned width?  I read that if you make a div inline, you cannot assign a width.  Then I read that inline-block will allow that.  But IE does not appear to support inline-block.  On Windows 7, IE renders two inline-block divs vertically. In chrome, they render horizontally. Is there a sensible explanation for this?

( how do you determine the version of IE you are running? )





style="display:inline-block; width:10em; background:red;">abc</div>




divstyle="display:inline-block; width:10em; background:blue;">efg</div>



2 Answers Found


Answer 1

Replace inline-block with inline  and you will get what you want.

<div style='display:inline;' />


Also check this article for more information on inlines:



To determine  the version  of IE - you can use the following javascript code:

function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  return rv;


Answer 2

Replace inline-block with inline  and you will get what you want.

<div style='display:inline;' />

Ali Hamdar (alihamdar.com)

What am I missing here? In IE8, I cannot get a series of divs  to render  across the page, each with an assigned  width. ( without using float ).

display:inline ignores the assigned width  of the div. The following blocks render side by side, but the width is the width of the text contents:

<h1>Using inline:</h1>




divstyle="display:inline; width:10em; background:red;">abc</div>




divstyle="display:inline; width:10em; background:blue;">efg</div>

display:inline-block renders  the way I want it to in chrome. A fixed width and the divs are horizontally side by size.  In IE8, the divs display  one under the other.




h1>Using inline-block:</h1>




divstyle="display:inline-block; width:10em; background:red;">abc</div>




divstyle="display:inline-block; width:10em; background:blue;">efg</div>



I'm trying this code below, but gettting error: System.Web.UI.WebControls.WebParts.WebPart' does not contain a definition for 'FilterValue1'

I need to change the value of the FilterValue1 properties of a content Query WebPart with title = Applicant Files.

Thanks in Advance!


protected override void OnLoad(EventArgs e)
using (SPSite SiteCollection = new SPSite("https://somesite/"))
SPWeb myWeb = SiteCollection.OpenWeb();
myWeb.AllowUnsafeUpdates = true;
Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager mgr = null;
mgr = myWeb.GetLimitedWebPartManager("default.aspx",System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
foreach (System.Web.UI.WebControls.WebParts.WebPart myWebPart in mgr.WebParts)
if (myWebPart.Title == "Applicant Files")
myWebPart.FilterValue1 = "/13";


Has anyone experienced the following or have any input on how I might fix this behavior?

I have an image gallery that has a large picture centered over a listing of thumbnails. The thumbnails are displayed using inline-block. I have used the star hack along with zoom to give the elements hasLayout. All is well in IE6, FF3, and IE7. However, In IE8 the thumbnails do not line up and are sometimes pushed up into the large picture. If I hover over them, they pop into place. If I reload the page they pop into place. When I navigate away and return to the page all is well. It seems like a combination of the inline-block not being fully applied and some sort of "jumping / peekaboo" bug.

Any help is greatly appreciated.

I am using a Traditional DOCTYPE and viewing in IE8 on Windows Vista.

Thank you.


I am facing the problem: Try Catch block is not work that try block failed but catch block is not excuted.

In my case, I tried to excuted the sql like below:

begin try

update [table] set [column] = abc

end try

begin catch
 select 'catch error'
end catch


The [column] is numeric format, but data set to it is not valid number.

When excute this sql, the following error prompt out:

Invalid column name 'abc'.

And the catch block has not been excuted.


I want to know what happen in this case.

Moreover, I found an article talks about the similar case too:



Is there any solution so that I can catch the error without stopping the batch?

Thanks a lot.


Every so often, queries are being blocked by a call to a stored procedure, which is being executed from Excel. There is no deadlock, so the blocked query hangs indefinitely.

From what I've read, ASYNC_NETWORK_IO means that the client is not reading data off the network fast enough. What I don't understand though, is why this would block other processes.

I would expect that when a client makes a call to the database, the database engine runs the query, gets the result set, and then release any locks before sending the resultset to the client.

I find it hard to believe that a single slow client could lock tables in the database.

Is this true?

There are two parts to my question.

How can you assure that slow clients don't block other callers when they cause ASYNC_NETWORK_IO issues?

The second question is if other people have seen this issue when Excel is a client to SQL Server 2005 using automatically refreshing queries (i.e. you set up excel so that it refreshes on some timely basis)



1.I try below code, why do I get all blobs(including committedBlobs which upload by Put Block and Put Block List) except UncommittedBlobs (do not call Put Block List),

protected void GetBlobsWithRequestOptions(String containerName)
 CloudStorageAccount cloudStorageAccount = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
 CloudBlobClient cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();

 CloudBlobContainer cloudBlobContainer = cloudBlobClient.GetContainerReference(containerName);

 BlobRequestOptions blobRequestOptions = new BlobRequestOptions();
 blobRequestOptions.UseFlatBlobListing = true;
 blobRequestOptions.BlobListingDetails = BlobListingDetails.UncommittedBlobs;

 IEnumerable<IListBlobItem> blobList = cloudBlobContainer.ListBlobs(blobRequestOptions);
 foreach (var item in blobList)
  var uri = item.Uri;

2. If I call Put Block and don't call Put Block List (when putting blocks, but net interrupted), and I call Put Block or Put Block List again after a week later, what exception I will get?


I have a validation helper method


I read the documentation and decorated this with the [ContractArgumentValidator] and after the throw statement added the Contract.EndContractBlock() method.

However, I was trying to write out some xml files and I started with a stream via


using (stream sw = ...)
  XmlWriterSettings settings = new XmlWriterSettings {...}
  XmlWriter xml_writer =XmlWriter.Create(sw, settings);



Code Contracts wasn't happy until I checked sw and settings were not null. My preferred method would be to call ThrowIfNull() but when I do I get the "Contract section within try block." compiler error. How am I supposed to make this work?




First, sorry for my poor English, I know this question may sound absurd, but there are many situations like showing several tables in one line, customized List Marker... which may need to show several Block items at one line.

Now I got 3 approaches,

1: use Floater or Figure, but they only provide basic functions for docking, so they cannot display more than 3 block decently, and when processing deeply nested lines, the result got so ugly and very difficult to coordinate.

2: use Table to layout the page, it do has a good result, but as it is a rule in both WPF and HTML that Table should be use to display Tabular data, it should not be used in layout.

3: use InlineUIContainer to wrap each Block in a Control which can display FlowDocument, this may be the worst option.

any ideas? thanks, in advance.


Hi, my name is Chuck England and I a Program Manager for Visual Studio’s Project & Build team here at Microsoft. This includes the Project System inside Visual Studio, MSBuild (shipped as part of the framework), and SCCI integration in Visual Studio.

The Project System is the integral part of Visual Studio that manages your project(s) and solutions. You probably recognize it most as the system you interact with to setup, add files to, and manage your projects and solutions.

MSBuild is a complete build environment. Through its XML file format, you define the build as a set of properties and items that build targets. These targets may be built from our predefined set of tasks, or from those you define yourself.

With this new release of Visual Studio, we have made significant additions and improvements to the Project System and MSBuild.

Walkthrough: How to Create an Inline Task In this walkthrough, "How to Create an Inline Task", we are highlighting our new feature "Inline Tasks" that allows you to write tasks in C# right inside your MSBuild (Project) file. This means you no longer have to build a separate assembly. It helps make custom build steps easy. Our sample walkthrough highlights how you might write a custom build rule to send an email when your build is complete.

We are really looking forward to hear your feedback. Please let us know what you think about the our scenarios in these walkthroughs, as well as other feedback you may have. We are interested in hearing about your overall experience and your thoughts about these new features into Visual Studio!

If you have not downloaded or would like more information about the CTP, please visit http://go.microsoft.com/fwlink/?LinkId=129231.  


Chuck England

Visual Studio Platform
Program Manager – Project and Build

Hi i would like to know if the vc2010 express edition will have

1. A resource editor
2. Suppport to compile SSE4 code
3. Suport for Inline Assembly

Currently i am using vc2008 EE and it can only do SSE2. i am just trying to find out if i am going to get any benifits switching to 2010. Thanks :)

Specifically, I need to know the format of the "\3MailStream" stream created by Outlook when adding inline images. The stream in question is 12 bytes long and seems to consist of 3 32-bit fields:

aa aa aa aa bb bb bb bb cc cc cc cc

The first of these fields always seems to contain the value 01 00 00 00, although I have no idea what it means.
By analysing a number of Outlook-generated emails, I came to the conclusion that the next two fields contain the x and y image dimensions respectively in HIMETRIC units. To generate these values, I applied a constant scaling factor to the pixel dimensions which yields values similar to those generated by Outlook. Although this appears to work ok, it would be useful if someone could provide the following information:

1. The significance of the first 32-bit field in the stream.
2. Confirmation that the second and third fields do indeed contain HIMETRIC dimensions.
3. Advice on the best way to calculate HIMETRIC units. Due to time constraints I wasn't able to investigate this fully, but since a HIMETRIC unit is 0.01mm and a pixel is a display-dependent quantity, I'm not sure that there can ever be a perfect conversion, as you don't know what kind of display device an email is ultimately going to be rendered on.

Thanks in advance for any help offered,




I am tasked to port a project to x64.  The project includes a few lines of inline asm code.  Could anyone tell me what would be the intrinsic for asm instructs in the following code?

    unsigned iwParam;
    short wTemp;
    DWORD dwOldESP;
    DWORD dwNewESP;

     __asm mov dword ptr [dwOldESP], esp;

    for (iwParam = 0; iwParam < cbArgs / sizeof(WORD); iwParam++)
        wTemp = ((unsigned short *)pbytArg)[iwParam];
        __asm push word ptr [wTemp];

 Thanks a lot



How do i disable Inline Assembler in VC98 such that compiler ignores all blocks/lines with __asm/_asm, without altering the legacy code.

I believe there is no compiler switch available. Kindly provide suggestions/hacks to get this working


I am forced to use VS2005/64b by the SOW, and I need to use some SSSE3 and SSE4 intrinsics.
Google-ing it, I found out that these intrinsics are not supported in VS2005, thus I tried to mimic their action, for example:
    _ct_shuffle_epi8 PROC
        movdqa xmm0, [RCX]                  ; load param 1
        pshufb xmm0, XMMWORD PTR [RDX]     ; shuf with param 2
    _ct_shuffle_epi8 ENDP
for the pshufb function from SSSE3.
In the C code I reffer it with:
extern "C"
    inline __m128i _ct_shuffle_epi8(__m128i a, __m128i b);
All works good, with the observation that is far from optimal and the masm generates the following asm code when calling _ct_shuffle_epi8 () :
  000c666 0f 7f 44 24 20movdqa XMMWORD PTR $T6999[rsp], xmm0
  000cce8 00 00 00 00 call _ct_shuffle_epi8
  000d166 0f 73 df 08 pslrdq xmm7, 8
  000d648 8d 54 24 30 lea rdx, QWORD PTR $T7002[rsp]
  000db48 8d 4c 24 20 lea rcx, QWORD PTR $T7001[rsp]
As one can see it generates a call to the function, instead of inlining it.
Given the fact VS2005/64b does not support inline _asm .. is there a way to inline the whole asm procedure? (like in the example above)
Or any other decent way to include some of the SSSE3 intrinsics in the VS2005 code?
Thank you.


Hi Guys,

anyone else seeing this?

I have a document library with 3K odd documents in it (mixture of DOC, XLS, PDF and PPT), all with various bits of metadata, mainly text, but a few numbers and one Managed Metadata field.

I set up a view to do some inline editing, with just two columns presented, one is a historic text field, the other is my Managed Metadata field.

So I'm happily (if slowly) manually using the text field as the basis for the Managed Metadata field.
I finish updating the first page (30 items) of results and use the little paging arrow to go to the next 30 items.
Inline edit the first item, save it, BANG!
It goes back to the first page of items, but the paging shows that it's on the 2nd page!

This happens for all subsequent pages of items. The paging basically becomes disconnected from the items displayed.

Note: refreshing the list/library displays the correct page (matches paging) of items.

Workaround #1: Use a view with a larger number of items per page. Good to a point, but I've got 3k+ items and I'm sure other people have even more...

Workaround #2: Because my Managed Metadata column is currently empty, I can configure my view to sort by that column, so empty ones are always displayed first. Not ideal, since the item I'll have just edited will dissapear? Actually, in my case this doesn't work at all, as either because it's a Managed Metadata field, or because my Managed Metadata is heirachical, I can't choose to sort the view by that field!


The leading edge is currently bleeding...




Is there any way to include some kind of auto-generated comments as part of implementing an interface?

Studio automatically fills the headers for the methods, can I auto-fill some sort of code comments at that same time?  (to help remember what each interface method is supposed to do without looking at external documentation.)

For example, if I could get the interface's XML Intellisense markup headers to copy from the interface down to the implementation's level, that would be great.




Hi All, when IE going to launch inline spell checke, as we got it for FireFox? Does any one know anything about it? Any information helpful.




// Injection Handle Create
Status = FwpsInjectionHandleCreate0(
    AF_INET,  // IPv4

// Add Callout FWPM_LAYER_OUTBOUND_IPPACKET_V4 , Add Filter Condition
displayData.name = L"Ids Callout";
displayData.description = L"Ids Callout";

mCallout.calloutKey = *calloutKey;
mCallout.displayData = displayData;
mCallout.applicableLayer = *layerKey;
Status = FwpmCalloutAdd0(


filter.layerKey = *layerKey;
filter.displayData.name = L"Ids Driver";
filter.displayData.description = L"Ids Driver";

filter.action.type = FWP_ACTION_CALLOUT_UNKNOWN;
filter.action.calloutKey = *calloutKey;
filter.filterCondition = NULL;
filter.numFilterConditions = 0;
filter.weight.type = FWP_EMPTY; // auto-weight.

Status = FwpmFilterAdd0(


 IN VOID *context,
 IN BOOLEAN dispatchLevel
 FwpsFreeCloneNetBufferList0(netBufferList, 0);

// OutBound IP V4 Packet Classify
 IN const FWPS_INCOMING_VALUES0  *inFixedValues,
 IN OUT VOID  *layerData,
 IN const FWPS_FILTER0  *filter,
 IN UINT64  flowContext,

 InjectionState = FwpsQueryPacketInjectionState0( InjectionHandle,

  classifyOut->actionType = FWP_ACTION_CONTINUE;

 Status = FwpsAllocateCloneNetBufferList0(NetBufferList,NULL,NULL,0,&NetBufferListClone);

 if (!NT_SUCCESS(Status)) {
      classifyOut->actionType = FWP_ACTION_CONTINUE;

 Status = FwpsInjectNetworkSendAsync0(InjectionHandle, NULL, 0, (COMPARTMENT_ID)CompartmentId, NetBufferListClone,
            TkSIMODInjectionComplete, NULL);
 if (!NT_SUCCESS(Status)) {

  if (NetBufferListClone != NULL) {
   FwpsFreeCloneNetBufferList0(NetBufferListClone, 0);
  classifyOut->actionType = FWP_ACTION_CONTINUE;
 classifyOut->actionType = FWP_ACTION_BLOCK;
 classifyOut->rights &= ~FWPS_RIGHT_ACTION_WRITE;
 classifyOut->flags |= FWPS_CLASSIFY_OUT_FLAG_ABSORB;


I’m reinhard and I am currently developing a WFP callout driver.

However, I have found that what worked fine in Windows Vista is not functioning well in Windows 7.


The code above works well in Windows Vista.

But in Windows 7, when using the corporate groupware e-mail program to attach a file, the file isn’t successfully attached and is put on Hold state.


Through what I’ve checked, I believe the FwpsInjectNetworkSendAsync0 reinject is successful, and OutBoundIPPacketClassify received the packet injected by myself , and that the process flows until classifyOut->actionType = FWP_ACTION_CONTINUE, and return;

But still when the file is attached, packets keep on going out but no further process occurs.


The code above doesn’t modify the packet and only reinjects them. (It inline-reinjects as shown in the WFP document). But it is still a problem in Windows 7.

The system doesn’t have other software installed and is in a clean state.


Could you please give me assistance in what I’m doing wrong, any known issues, and any solutions?


Thank you in advance and I hope to hear back from you soon.


Best regards,




I was recently tasked with adding a feature to the RichText editor for wiki pages that allows the users to add inline base64 images to the page.

My question is: how can I disable the automatic change of the <img > tag? When I save my page it seems that SharePoint changes my HTML and removes the src attribute. The reason why I need this is because our clients want to save the lists as templates (together with the list’s data) and share them with other people.


Thanks in advance,



I need to use a function from the coredll.dll, GetCurrentProcessID().

It happens that when I use my usual dllImport:

public static extern uint GetCurrentProcessId();

It says that doesn't find. I look forward and I find that the function exists but it has the inline keyword on it. How can I workaround this and use this function?

(windows ce 6.0 device, cf 3.5)

I have a simple menu

<SharePoint:AspMenu 					ID="TopNavigationMenu" 








	StaticPopoutImageUrl="/_layouts/images/menudark.gif  StaticPopoutImageTextFormatString="" 			DynamicHoverStyle-BackColor="#CBE3F0" 



	 StaticMenuStyle CssClass="topNav" />

	 <StaticMenuItemStyle CssClass="topNav"  ItemSpacing="0px" />

	 <StaticHoverStyle CssClass="topNav">



This inserts inline style (in bold) to the item when the menu is rendered:

<a class="zz1_TopNavigationMenu_1 topNav zz1_TopNavigationMenu_3" style="border-bottom-style: none; border-right-style: none; border-top-style: none; font-size: 1em; border-left-style: none;" href="http://URL">

If I remove the CssClass from the <StaticMenuItemStyle> element, the above inline style does not get rendered.

All I need to do is increase the font of the menuitems, but apparenetly this is impossible.

Is there an explaination for this, because I should would love to here one?





<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure