What Is #region And What Does It Do
Mar 15, 2010What is #region, and what does it do?
View 2 RepliesWhat is #region, and what does it do?
View 2 RepliesCan anybody tell me the description about
"#region PageLoad"
which i absorbed in a code given to me....
Similar region in C#, is there stuff available for MS SQL?
View 1 RepliesI'm working on an asp.net mvc application. Each user have his own time zone.Right now, I'm using "TimeZoneInfo.GetSystemTimeZones" to generate a drop down list in order for the user to select a timezone and this is what I store in my db
They are like that:
Morocco Standard Time (00:00:00)
UTC (00:00:00)
GMT Standard Time (00:00:00)
...
I know that php use a different timezone set, they are "region timezone", for example:
Europe/Paris
Europe/London
...
My question is: is there a way to play with the region timezone (like php) in an .NET application? The only way I can think of is to bind each php region timezone to the .net timezone.Also, the "TimeZoneInfo.GetSystemTimeZones" list all of the timezone on the machine. Is the list different between windows server, windows vista, windows xp?
I have a requirement for my client (100000/1 Lakh users) for a Asset Tracker portal (Laptops/Desktops) where in I have a show the Asset (Laptop/Desktop was with whom and currently with whom) history (Trace Infromation) on a Report. There might be a n no of users who have used the same laptop.
From the beginning till the end of the life cycle of an asset, the trace of asset owner needs to be captured thoughout.We need to show the asset history report in a single row of data.e.g: Laptop was with A then with B and then with C and Currently with C. Not alone user history we also need to capture the Region/Location information of the asset and certain other things too.
how to implement this since there are lot of assets which needs to be registered in the portal.I am using SQL 2005.
I have a template where I want to replace certain regions. In my example below, I want to extract the regions between the. comments, manipulate it, then replace them back after the manipulation. I do not need the logic to merge the fields, but I need to extract the regions so I can use my logic and place it back into the template. Does anyone know of an elegant or simple way to extract these regions? I am also hoping to extract the url values in the process as well if it is easy to do along the way.
<table width="700" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td align="center" valign="top">
<!--DynamicSlotStart url="http://www.test.com/itemdisplay0_10751_-1_57436_10001"-->
<table>
<tbody>
<tr>
<td><p><a title="[element='title']" href="[url]"><img border="0" alt="[element='title']" src="[element='photo' property='src' maxwidth='135']" width="135" height="135" /></a></p></td>
</tr>
<tr>
<td><span>[element='h1']</span></td>
</tr>
<tr>
<td><span><strong>[element='price']<br />
</strong></span><span>[element='was_price']</span></td>
</tr>
<tr>
<td><span><a title="[element='title']" href="[url]">Details</a></span></td>
</tr>
</tbody>
</table>
<!--DynamicSlotFinish-->
</td>
<td align="center" valign="top">
<!--DynamicSlotStart url="http://www.test.com/itemdisplay0_10751_-1_3379_10001"-->
<table>
<tbody>
<tr>
<td><p><a title="[element='title']" href="[url]"><img border="0" alt="[element='title']" src="[element='photo' property='src' maxwidth='135']" width="135" height="135" /></a></p></td>
</tr>
<tr>
<td><span>[element='h1']</span></td>
</tr>
<tr>
<td><span><strong>[element='price']<br />
</strong></span><span>[element='was_price']</span></td>
</tr>
<tr>
<td><span><a title="[element='title']" href="[url]">Details</a></span></td>
</tr>
</tbody>
</table>
<!--DynamicSlotFinish-->
</td>
<td align="center" valign="top">
<!--DynamicSlotStart url="http://www.test.com/itemdisplay0_10751_-1_104854_10001"-->
<table>
<tbody>
<tr>
<td><p><a title="[element='title']" href="[url]"><img border="0" alt="[element='title']" src="[element='photo' property='src' maxwidth='135']" width="135" height="135" /></a></p></td>
</tr>
<tr>
<td><span>[element='h1']</span></td>
</tr>
<tr>
<td><span><strong>[element='price']<br />
</strong></span><span>[element='was_price']</span></td>
</tr>
<tr>
<td><span><a title="[element='title']" href="[url]">Details</a></span></td>
</tr>
</tbody>
</table>
<!--DynamicSlotFinish-->
</td>
<td align="center" valign="top">
<!--DynamicSlotStart url="http://www.test.com/itemdisplay0_10751_-1_80977_10001"-->
<table>
<tbody>
<tr>
<td><p><a title="[element='title']" href="[url]"><img border="0" alt="[element='title']" src="[element='photo' property='src' maxwidth='135']" width="135" height="135" /></a></p></td>
</tr>
<tr>
<td><span>[element='h1']</span></td>
</tr>
<tr>
<td><span><strong>[element='price']<br />
</strong></span><span>[element='was_price']</span></td>
</tr>
<tr>
<td><span><a title="[element='title']" href="[url]">Details</a></span></td>
</tr>
</tbody>
</table>
<!--DynamicSlotFinish-->
</td>
</tr>
</table>
I am trying to convert a solution using EntLib into using AppFabric caching. By help of a few extension methods this is a fairly pain-free process.
Extension methods I use:
public static bool Contains(this DataCache dataCache, string key)
{
return dataCache.Get(key) != null;
}
public static object GetData(this DataCache dataCache, string key)
{
return dataCache.Get(key);
}
But there are two features of EntLib I find difficult to convert. Namely "Count" (counting number of keys in cache) and "Flush" (removing all data from cache). Both could be solved if I could iterate the keys in cache. There is a method called ClearRegion(string region), but that required me to specify a region name on all Get/Put/Add-methods I use, which would require some manual error-prone work.
Is there any way to get a list of keys in cache?
Is there a default region name I can use?
How can I flush the cache when I haven't used a region name?
I need to deliver source code to client and my boss need to remove all the comments and #region sections from the whole web site source code.
So is there any functionality available in visual studio 2010 or may be in an other 3rd party tool available to do so, which can remove all the #region from all over the source code ?
Otherwise my developers has to do donkey work.... :(( and I don't wish it.
i create a generic handler (ashx) but i am trying to add region in my code like the following
#region MyRegionName
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
#endregion
there is no error but the problem that there is no expand and collapse.
I use asp.net with code behind and c#.
So I have two file for every .aspx page in VS 2010.
In .aspx.cs page I am able to add regions in my code using:
#region Name Region
#endregion
My questions:
How to do it in file .aspx? #region seems working only in .cs file. organize better my code both for .aspx and .cs file? Do you know the keyboard shortcuts to expand or collapse all my region in my code?
i put this plug in into my website, how i do define a region and restrict visitors to can not going out of ?
I don't have access [URL] for political reasons.
I want o upload the folder to server. for that when user drag and drop the folder the i will get the path at that time ui will zip it uploadedd to the folder.
View 1 RepliesIs there a way to give the selected range of a SliderControl a differrent color/image?
heres an example from Telerik.
[URL]
As fare as I have worked with the Slider and MultiHandleSlider i dident find a way to create a slider looking like the one above (again: i need the selected range in a different color then the rest)
I tryed creating a MultiHandleSlider with only one slider, but as an effect the style for the part between the sliders is not used.
The normal Slider control has no option to create the wanted look
So how to create a slider with marked selected rang using the ASP Toolkit?
I'm using a hyperlinkfield and would like to change the text that's displayed in the Region field
<asp:HyperLinkField
DataNavigateUrlFields="Dowrdate,Region"
DataNavigateUrlFormatString="NatAreaMonth.aspx?Dowrdate={0}&Region={1}"
DataTextField="Region"
Text="Region"
/>
[Code].....
I want to crop a picture in a picturebox by allowing the user to selecta rectangular region like you get in software like Photoshop.
Or User Will select a region in pircture box and then region will be saved as a individual picture.
Is it possible using C#.
Just to avoid misuse of website i have to make it specific for certain region. Like people could view menu across the world and only the people of mumbai can order online. I want a submit button that would be visible to only mumbai people.
View 1 Replieshere is the link where sql transaction is used [URL]
in this line
Code:
myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')";
RegionID is entered by user rather than auto generated ,so i have same problem but only difference is that if i have auto generated what code should i write in try block .
I am trying to use this code:
[Code]....
And i get this error:
Incorrect syntax near the keyword 'AS'. What i am trying to do is SELECT details of a job and also SELECT which region the job is in. I currently have this: [URL] But i need to change it so it shows the Job name, details and then the regions..
How to link multiple DataSets (why SSRS call it a DataSet even there is only one bunch of data fields in it) using keys, then put data fields from multiple DataSets into one Data Region? The reason I have to do this is: There will be 6 major DataSets to be used together few times in same report, it is not make sense to build a huge Matrix for all of them together. (in some data region I use data from dataset A and B, some times I use data from dataset A and C, D ...)
View 2 Replies