Coding Platform: ASP.NET C#
I have an XML like this.
<Items>
<Map id="35">
<Terrains>
<Item id="1" row="0" column="0"/>
<Item id="1" row="0" column="1"/>
<Item id="1" row="0" column="2"/>
<Item id="1" row="0" column="3"/>
<Item id="1" row="0" column="4"/>
...
I have created an ASP.NET class.
In that class i would like to use the Server.UrlEncode.
Why intellisense is not helping me at all and instead of Server.UrlEncode it displays the HttpServerUtility?
I have already a reference to system.web
...
I'm trying to implement a onclick event to select an item in a asp:ListViewControl.
<ItemTemplate>
<tr runat="server" id="MemberRow" onclick='<%#ClientScript.GetPostBackClientHyperlink(LvMembers, string.Format("Select${0}", Container.DataItemIndex)) %>'>
<td>
<asp:Literal runat="server" ID="LtlMember...
I have suppliers table with id int value for each supplier. I'm trying to edit columns of this table inside of ListView.
i'm trying to access e arg but it doesn't have any data on id of the row i'm trying to update?
...
If I get my dataset into a DataTable then I can do with it as I like, but I have the complexity of handling sort, paging and caching manually. I'm trying to avoid this for now.
If I instead use a SQLdataSource that's all free.
I need a grand total row, the contents of which I display outside the gridview.
I know that I can get that b...
The website needs to be equipped with a content management system and should provide for social media integration and localization.
What are the pros and cons of each technology platform and when should we opt for sharepoint?
...
Hello,
I have a Windows Form project that I would like to migrate toward a web application using ASP.NET MVC2.
In this project I have some POCO classes as in this example that are part of a class library and that I would like to use with a binary reference
public class Person
{
public int PersonID { get; set; }
public string ...
Hi all,
I have explicitly added __doPostBack() on Button onclientClick event .
<asp:Button ID="Button1" runat="server" Text="Button"
OnClientClick="__doPostBack('Button1','')"/>
When I am clicking the button the Page_Load is calling twice.
But if I am adding below code inside page load ,page load is calling only once on bu...
I have a custom attribute that I use in various elements in my ASP.NET HTML markup. Obviously it violates the DTD, and I get a validation error from Visual Studio. I hate ignoring errors in the error output window. Is there a way to suppress this error message? For example:
<label id="MyId" cid="MyCID" runat="server" />
cid is a custo...
What's the best approach to provide URL handling in an ASP.NET application to produce results similar to Craigslist. Specifically, I'm looking to handle something like "newyork.mysite.com" and "california.mysite.com", along with parameters such as "newyork.mysite.com/products/hardware". Based on the "location" (newyork.), my goal is to...
I load the content of some User Controls into my page with the use of jQuery. So I have this function that extracts the content from my User Control, and it works like a charm.
public string GetObjectHtml(string pathToControl)
{
// Create instance of the page control
Page page = new Page();
// Create ins...
I'm using window.print() to print a page. It is also printing the url of the page. How can I avoid this (using code)?
...
I am getting this error, and cant figure out what the issue is.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse ...
Very often i write code like:
<img class="hasMenu" src="<%= (Model.Image==null)?Url.Content("~/Content/NoImage.jpg"):Model.Image.standard %>"
alt="Main image" />
Is there any predefined function which could beauty this code?
Something like: ValueOrDefault(Model.Image.standard,Url.Content("~/Content/NoImage.jpg"))
...
I have an application that works great on localhost with forms authentication.
I deployed it to the deployment machine and it to the build machine and received and endless set of 302 redirects.
I try logging onto the deployment machine and access the page via the deployment machines ip and it works again.
So it is not working when I t...
How is it possible to return some kind of list from a WCF service, this the method in my WCF service.
My interface:
[OperationContract]
[WebInvoke(Method = "GET",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "Locations")]
IList<Location> GetLocations();
public IList<Location> GetLoc...
How do you pass an argument in Telerik's RadListBox OnClientSelectedIndexChanged event?
It seems the method you call with this event is
<script type="text/javascript">
someMethod(sender, eventArgs)
{
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
if (ajaxManager != null)
ajaxManager.ajaxRequest("Lis...
I am building my first ASP.NET MVC site and this site needs to be in 2 languages.
When a user selects a language from the menu, the site would present itself in that language.
The content likely will be loaded all from resource files. Can I respond to a change in the culture definition at runtime so it load the correct resource file?
...
I am trying to add page routing (I use regular asp.net 4.0, not mvc), so that when a user goes to:
http://sitename.com/public/member/view/andrey
they would get to:
http://sitename.com/public/memberprofile.aspx?userName=andrey
I added following in Global.asax:
protected void Application_Start(object sender, EventArgs e)
{
RouteTab...
I understand that the title is a little vague and all-encompassing, so please let me try to narrow it down.
What I would like is advice on how to develop a mostly Ajax website, where portions of the UI are asynchronously loaded. Here's the catch: I'd like to have the browser back/forward buttons work intuitively - something that Faceboo...