1/07/2014

C# Scrolling label's text to the left

Scrolling label's text to the left
Scrolling label's text to the left


private void timer1_Tick(object sender, EventArgs e)  
     {  
       lblScroll.Text = lblScroll.Text.Substring(1, lblScroll.Text.Length - 1) + lblScroll.Text.Substring(0, 1);  
     }  
 private void ScrollText_Load(object sender, EventArgs e)  
     {  
       lblScroll.Text = "   Text is moving   ";  
     }  

C# Moving Label to the left and right

Moveing Label to the left and right
Moving Label to the left and right


 public partial class ScrollText : Form  
   {  
     public bool moveright = true; //This Variable should be declared globaly  
     public ScrollText()  
     {  
       InitializeComponent();  
     }  
     private void timer1_Tick(object sender, EventArgs e)  
     {  
       if (moveright == true)  
       {  
         lblScroll.Left += 5;  
       }  
       else  
       {  
         lblScroll.Left -= 5;  
       }  
       if (lblScroll.Left <= Convert.ToInt32(this.ClientRectangle.Left))  
       {  
         moveright = true;  
       }  
       if (lblScroll.Left + lblScroll.Width >= Convert.ToInt32(this.ClientRectangle.Right))  
       {  
         moveright = false;  
       }  
     }  
   }  

C# Scroll label from left to right

Scroll label from left to right
Scroll label from left to right


private void timer1_Tick(object sender, EventArgs e)  
     {  
       if (lblScroll.Left >= Convert.ToInt32(this.ClientRectangle.Right))  
       {  
         lblScroll.Left = this.ClientRectangle.Left - lblScroll.Left;  
       }  
       else  
       {  
         lblScroll.Left += 4;  
       }  
     }  

C# Scrolling a label from right to left

Scroll label from right to left
Scroll label from right to left


private void timer1_Tick(object sender, EventArgs e)  
   {  
      if (lblScroll.Left + lblScroll.Width <= Convert.ToInt32(this.ClientRectangle.Left))  
       {  
         lblScroll.Left = this.ClientRectangle.Right;  
       }  
      else  
       {  
         lblScroll.Left -= 4;  
       }  
   }  

1/03/2014

Asp .Net Error 'The resource cannot be found'

Asp .Net Error 'The resource cannot be found'
Asp .Net Error 'The resource cannot be found'

<configuration>

    <system.web>
      <compilation debug="true" targetFramework="4.5.1" />
      <httpRuntime targetFramework="4.5.1" />
    
  <customErrors mode="On" defaultRedirect="~/Errors/GeneralErrors.aspx">
    <error statusCode="403" redirect="~/Errors/Error403.aspx"/>
    <error statusCode="404" redirect="~/Errors/Error404.aspx"/>
    <error statusCode="500" redirect="~/Errors/Error500.aspx"/>
  </customErrors>
    
    </system.web>

</configuration>

1/02/2014

Asp .Net WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery' Error

Asp .Net WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery' Error
Asp .Net WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery' Error


<configuration>  
  <system.web>  
   <compilation debug="true" targetFramework="4.5.1" />  
   <httpRuntime targetFramework="4.5.1" />  
  </system.web>  
  <appSettings>  
   <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />  
  </appSettings>  
 </configuration>