Monday, 29 October 2012

GridviewRowDatabound


 

 if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label newlabel= e.Row.FindControl("label1") as Label;

                String mydata = newlabel.Text;
              
                if(mydata.Equals("sometext")
                {
                    Label newlabel2= e.Row.FindControl("label1") as Label;
                    newlabel2.ForeColor = System.Drawing.Color.Green;
                }
                else
                {
                    Label newlabel2= e.Row.FindControl("label1") as Label;
                    newlabel2.ForeColor = System.Drawing.Color.Red;
                }
            }

Disable browser back button functionality using JavaScript in asp.net




<script type="text/javascript" language="javascript">
function DisableBackButton() {
window.history.forward()
}
DisableBackButton();
window.onload = DisableBackButton;
window.onpageshow = function(evt) { if (evt.persisted) DisableBackButton() }
window.onunload = function() { void (0) }
</script>

Convert SVG to PNG using svg.dll

      <div id="divsvg">        <svg width="350" height="300"><defs></defs> ............