Search

You searched for the word(s): userid:851636

Matching Posts

  • Re: DataBound Label Control Format String

    Hi! Please use this.. Text='<%# Eval("Total","{0:f2}") %>' It would round the decimal to two decimal places.. for example 1.1498 would be treated as 1.15 and 1.011 would be taken as 1.01 Thanks
    Posted to Getting Started (Forum) by deepthoughts on 11/25/2009
  • Re: Screen resolution

    Hi! There could be several approaches.. 1.) One approach could be to optimize your layout for one resolution (lets say 1024x768) by using a fixed width container (of lets say 1000px width) and giving it margin:auto this way for higher resolutions the container would come in the center of the screen... and ofcourse all your content would reside inside this container.. something like this.. <div id="container" style="width:1000px; margin:auto;> //All content.. </div> 2.)
    Posted to Web Forms (Forum) by deepthoughts on 11/25/2009
  • Re: public private constructor

    Hi! Please note that what happens when we inherit a class from a base. The constructor of inherited class fires the constructor of base class.. so simply when the constructor of base class would be private, it wouldn't get called so the base class wouldn't be created and so no inheritance would occur. Please check this sample code snippet.. public class Base1 { private string name; public string Name { get { return name; } set { name = value; } } private Base1() { name = "How are you";
    Posted to Getting Started (Forum) by deepthoughts on 11/23/2009
  • Re: Two way databind custom user control

    [quote user="florune"]No, that doesn't work. I guess when I bind to the Text property of a standard textbox, there is built in functionallity to notify when the property change. [/quote] No that shouldn't be the case. Just specifying a property with get and set accessors would make it two way data bound. I've created an example for you.. please try reproducing it at your end, and see its working fine :-) <%@ Page Language="C#" %> <%@ Register TagPrefix="uc"
    Posted to Web Forms (Forum) by deepthoughts on 11/23/2009
  • Re: master pages and css

    Hmmm... if you believe its the Segments array issue, then another approach could be to use EndsWith function of the string object to know that with which file name your path is ending.. Something like this(the previous Masterpage code modified).. <%@ Master Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Page_Load
  • Re: Deselect the ListBox Programaticaly

    Hi! Please check this.. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" language="javascript"> function Deselect() { document.getElementById('<%= ListBox1.ClientID %>').selectedIndex = -1; } </script> </head> <body> <form id="form1" runat="server"> <div id="main"> <asp:ListBox ID="ListBox1"
    Posted to Web Forms (Forum) by deepthoughts on 11/22/2009
  • Re: Can you set the mouse position in c# asp.net

    [quote user="awfarral"] Thanks for the suggestion, but recording in something like camtasia will I would loose the upto date data that the chart is reading dynamically from the database, when it loads. [/quote] Its a bit confusing... Camtasia (or any other screen recording software) would record whatever your screen is showing, your mouse actions etc... so whatever your browser would be displaying at that moment would be recorded.. Thanks.
    Posted to Getting Started (Forum) by deepthoughts on 11/22/2009
  • Re: Calculate Function On JavaScript

    Hi! Please check this... <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" language="javascript"> function Calculate() { var sayı = document.getElementById('<%= TextBox1.ClientID %>'); var yüzdelik = document.getElementById('<%= TextBox2.ClientID %>'); alert(parseFloat(sayı.value) + parseFloat(yüzdelik.value)); } </script> </head>
    Posted to Web Forms (Forum) by deepthoughts on 11/22/2009
  • Re: master pages and css

    Hi! Please check this, I made a little change in the Masterpage code of Hong-Gang Chen - MSFT to reflect the other approach I was talking about... <%@ Master Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { Actived(Request.Url.Segments[2]); } /// <summary> /// Active
  • Re: Passing null as parameter from client side Button Click

    Hi! Please note that its not a good practice to call an event handler manually. If you want to execute the same piece of code from within an event handler and also from somewhere else then a better approach is to put that piece of code inside a method and call that method from the event handler.. Something like this.. protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MyMethod(); } } protected void btn1_Click(object sender, EventArgs e) { MyMethod(); } public void MyMethod
    Posted to Web Forms (Forum) by deepthoughts on 11/20/2009
Page 1 of 73 (729 items) 1 2 3 4 5 Next > ... Last »