Finding Description About #region PageLoad
Nov 9, 2010Can anybody tell me the description about
"#region PageLoad"
which i absorbed in a code given to me....
Can anybody tell me the description about
"#region PageLoad"
which i absorbed in a code given to me....
<asp:FormView ID="FormView1" runat="server" DataKeyNames="productnum"
DataSourceID="EDS_Product">
<ItemTemplate>
<div class="ContentHead"><%# Eval("name") %></div><br />
<table border="0">
<tr><td style="vertical-align: top;">
<img src='images/big/<%# Eval("image") %>' border="0" alt='<%# Eval("name") %>' /></td>
<td style="vertical-align: top"><%# Eval("description") %>
<br /><br /><br /></td></tr></table>
<span class="price"><b>Your Price:</b> <%# Eval("price", "{0:c}")%><br /><span class="number"><b>Number:</b> <%# Eval("number") %>
</span><br /><a href='AddToCart.aspx?productnum=<%# Eval("productnum") %>'>
<span class="ProductListItem"><b>Add To Cart<b></font></span></a>
</ItemTemplate>
</asp:FormView
this is from the product details page and the description goes in a straight line always - i want to make the description a box and have lenght of 30 characters every line -- i want to modify the description not to be in a straight line
I have in my database the News Table which consist of => Id, Title, txt . I need to be able to get a description text from the whole text which exist in txt Field , but without any codes like <...> , just a pure text !! how can I do this?
View 3 RepliesI have a masterPage on that i am using AjaxModalPopup for login purpose.My requirement is when i login via Master page then it should show the Logged-in User details on the current Content Page that is using same master page.
Here i am using following code to get it back to the same content page after succesful login but it does not show the user details on the same content page rather when i go to next page then it appears.
if (Session["SignedIn"] == null)
{
ValidateUser();
ModalPopupExtenderMaster1.Hide();
string currentPageUrl = System.IO.Path.GetFileName(Request.Url.AbsolutePath);
Server.Transfer(currentPageUrl);
}
But it does not gives user-details on the same content page.
i have the following two questions:-
1. let say i have a table for ITEMS including (item id,item description id (FK to the ITEM Description tabe), item price,etc) and have ITEM Description look up table having (item descriptionid,item description),.
so what is better to use the ITEM DESCRIPTION look up table and store the item description id in the items table
or
to directly store the item description "Not the id" in the item table.
2. I am working on an MVC web application using LINQ, now if i want to modify the SQL server tables which i have created for example modify some of the foreign key properties will the effect be directly reflected on any new inserted or deleted records or i have to create a new LINQ to SQL class?
What is #region, and what does it do?
View 2 RepliesSimilar 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 RepliesI have written a function and want to add some description against each paratemeter it takes, how can i do this in vb.net?
[Code]....
How to replace cell value with their description. This is my grid
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None">
<HeaderContextMenu EnableAutoScroll="True">
</HeaderContextMenu>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID" DataSourceID="SqlDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" HeaderText="OrderID"
ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" SortExpression="CustomerID"
UniqueName="CustomerID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" HeaderText="OrderDate"
SortExpression="OrderDate" UniqueName="OrderDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="RequiredDate" DataType="System.DateTime" HeaderText="RequiredDate"
SortExpression="RequiredDate" UniqueName="RequiredDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShipName" HeaderText="ShipName" SortExpression="ShipName"
UniqueName="ShipName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShipAddress" HeaderText="ShipAddress" SortExpression="ShipAddress"
UniqueName="ShipAddress">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShipCity" HeaderText="ShipCity" SortExpression="ShipCity"
UniqueName="ShipCity">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShipRegion" HeaderText="ShipRegion" SortExpression="ShipRegion"
UniqueName="ShipRegion">
</telerik:GridBoundColumn>
telerik:GridBoundColumn DataField="ShipPostalCode" HeaderText="ShipPostalCode" SortExpression="ShipPostalCode"
UniqueName="ShipPostalCode">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" SortExpression="ShipCountry"
UniqueName="ShipCountry">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
This grid will load Orders table. How to replace CustomerID with CompanyName which is come from Customers table during run time?
i an sending the url with some inofmation say some thing like this:
"http://localhost:4622/Emp_ResumeResult.aspx?UId=109" now if any one types 110 in place of 109 the infomration of 110 is being displayed so how can i hide this information and how can in encript and decript this issue any url or code.
i am assigned to web part of some project.My duty is to create web form from xml.These xml comes from window part and tells which controls are include in my web form and their properties.My xml Format is like below.
<Object type="System.Windows.Forms.Form">
<Property name="Name">Form1</Property>
<Property name="Text">Option</Property>
[code]...
I need a brief description and concept that what is event mapping in Asp.Net?
If you have any useful link tell me. Write here if you know about this