Thursday 12 March 2020

Tips for improve your programming skills..

Tips for improve your programming skills..
----------------------------------------------------
If you are new in this world of programming, I have some secrets to share as per my personal experience.

1 . Maths...

If you are really good in math, that means you are interested to solve problems. This will look like a joke, but the problem solving skills in math is really important if you want to be a pro coding guy.

2. Start...

Start learning, start practicing and do not stop until you are not finishing your expected output.

3. Make small targets daily and finish them

4. Explore new concepts, framework and ideas of programming

5. Work on real projects

So this are some tips that I have implemented...

And right now I have confidence on me that I can develop any product as a full stack developer on my own.

Thursday 19 December 2013

Issue Facing for saving Changes does not permitted


The Save                  (Not                                                          Permitted) dialog box warns you that saving changes is not permitted because the changes you have made require the listed tables to be dropped and re-created.
The following actions might require a table to be re-created:
  • Adding a new column to the middle of the table
  • Dropping a column
  • Changing column nullability
  • Changing the order of the columns
  • Changing the data type of a column <<<<
To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.

If yes, goto Menu >> Tools >> Options >> Designers and uncheck “Prevent Saving changes that require table re-creation”














Monday 25 November 2013

Display data from a TextBox to a GridView without saving the data to the database

You have to persists the data between postbacks,

You have many options here: by Session, ViewState, Cache and some other.

protected void Page_Load(object sender, EventArgs e){    if (Page.IsPostback)    {         dt = Session["data_table"] as DataTable;    }}protected void btnTextDisplay_Click(object sender, EventArgs e){     if (dt == null)     {          dt = new DataTable();          DataColumn dc1 = new DataColumn("Name");          DataColumn dc2 = new DataColumn("City");          dt.Columns.Add(dc1);          dt.Columns.Add(dc2);   
     }     DataRow dr = dt.NewRow();     dr[0] = txtName.Text;     dr[1] = txtCity.Text;     dt.Rows.Add(dr);     gvDisplay.DataSource = dt;     gvDisplay.DataBind();     Session["data_table"] = dt;}

mulltiple datatable ,i want to show all the datatable rows into a single gridview.

DataTable  dt1 = ( DataTable)Session["a"];
DataTable  dt2 = ( DataTable)Session["b"];

DateSet ds=New DataSet();
ds.Tables.Add(dt1);
ds.Tables.Add(dt2);
GridView1.DataSource=ds;
GridVoew1.DataBind();


Saturday 16 November 2013

Multiple Image Animation Creator Example




<html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server"><title></title><script type="text/javascript">function copydata(val) {
var parentvalue = document.getElementById(val.id).value;
var elemArray = document.getElementsByName("Child");
for (var i = 0; i < elemArray.length; i++) {
var elem = document.getElementById(elemArray[i].id);elem.value = parentvalue;
}
}

</script></
head><
body><form id="form1" runat="server"><div><input type="text" name="Parent" id="copy_from" onkeyup="javascript:copydata(this)" /><h5><u>Child Control Data</u></h5><input type="text" name="Child" id="copy_to1" disabled />&nbsp;&nbsp;<input type="text" name="Child" id="copy_to2" disabled /><br /><br /><input type="text" name="Child" id="copy_to3" disabled />&nbsp;&nbsp;<input type="text" name="Child" id="copy_to4" disabled /><br /><br /></div></form></
body></
html>

Friday 12 July 2013

How to block different extension files accessed by unauthorized user before Login


    Web.config

    <system.web>
                   <!--Secure ASP.NET cookies-->
    <httpCookies httpOnlyCookies="true" requireSSL="true" lockItem="true" />
    <!—Extension files block for unauthorized user access-->
    <httpHandlers>
          <add verb="*" path="*.txt" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.pdf" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.jpg" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.gif" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.png" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.ico" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.xls" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.xlsx" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.csv" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.doc" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.docx" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.cab" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.htm" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.log" type="WebHandlers.Handler,WebHandlers"/>
          <add verb="*" path="*.xml" type="WebHandlers.Handler,WebHandlers"/>
    </httpHandlers>
    <system.web>

    Type of file extension added to block before login

    *.jpg, *.txt, *.xls, *.xlsx, *.png, *.gif, *.pdf, *.doc, *.docx

    *.csv, *.ico, *.cab,*.htm, *.log, *.xml



    i