Flash Embeded In Asp.Net (Flash Movies In Asp.Net)



Flash Embedded in Asp.Net :-

After creating a Flash movie you choose File -> Save As from the top menu to save your movie. Save the file as "Somefilename.fla".
To embed the Flash movie you just made into an Asp.Net page, you should go back to your Flash program and do the following steps:
Step 1
Choose File > Open. Open a Flash movie you have created.
Step 2
Choose File > Export Movie.
Step 3
Name the file "somefilename.swf". Choose the location where the file is to be stored (in your Web folder). Click OK.
Step 4
Open the ASPX Code Page where you want to insert your Flash movie. Insert this code:


<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400">

</embed>
</object>


Note: This is the minimum code you need to embed a Flash movie in a browser. A broken icon will appear on the Web page if the user does not have the Flash plug-in installed.
 

Step 5
Type in the address of the HTML file in your browser and look at your first Flash movie.


Prev Post                                                      All Post                                                           Next Post




Posted in | 2 comments

ASP.NET Regular Expression for date format

In ASP.Net Many times required to Validate Date Fromat Enter in Control.
in Regular Expression Following RE used to Validate Date Format.


dd/mm/yyyy Format In regular Expression    (optional mm,optional dd)
([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]([1-9]|0[1-9]|1[012])[- /.][0-9]{4}$


mm/dd/yyyy   (optional mm,optional dd)
^([1-9]|0[1-9]|1[012])[- /.]([1-9]|0[1-9]|[12][0-9]|3[01])[- /.][0-9]{4}$

mm/dd/yyyy  (Exact Format)
^([01]\d)/([0-3]\d)/(\d{4})$


Prev Post                                                      All Post                                                           Next Post

Posted in | 3 comments

Invalid postback or callback argument,Asp.Net 2.0

Problem :-

Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.


Solution :-


It’s Common Problem With Asp.Net 2.0 (Microsoft Professional Edition,Beta Version Not Give an Error.) To Solve This Problem What You Have to Do Just Write Following Code in Web.Config.
<system.web>
<
pages enableEventValidation="false"/>
system.web>
Doing this One It’s Solve Your Problem But It’s Effect On Your Site Security. Basically EnableeventValidation of asp.Net pages are ture.Wich Prevent Injection Attack.Make it’s False Involve This Injection Attack.

Prev Post                                                      All Post                                                           Next Post

Posted in | 2 comments

GridView

->  The Gridview Is Very Power full Server Control to Display Data From Data Source.

-> DataGrid is Very easy to use and Flexible Control.

-> You Can Use Inbulit format which Provide by GridView Or you Can Also dispaly Gridview as You Likes.

-> You Can Perform Any Action With Gridview Data (edit,Delete,Add ,ect ...)

-> You Can Use Itemtemplet To dispaly Data In formated Manner.Or Used Any Control in Gridview.

-> Gridview is easy to used and Provide many Facility Like PageIndexchannging Which Difficult in DataList but Gridview make it's easy.

-> You Can make Any Good Formating in Header and Footer Or also Can Add Custom 2-3 Header By making code in ItemCreated Events.

-> Simple Exmaple to Bind a Gridview

    con.Open();
        DataSet data = new DataSet();
        SqlDataAdapter sda = new SqlDataAdapter("select * from tbale_name", con);
        sda.Fill(data);
        dl_saved_can.DataSource = data;
        dl_saved_can.DataBind();
        con.Close();
 
PageIndexChanging Event
 
 
        grd_forward_you.PageIndex = e.NewPageIndex;
        Bind_Grid(); //Bind Data


This Is Just simple example How Ever you can do anything with gridview data And also 
Dispaly data In Professional Style.


What you Say About Gridview ??

Prev Post                                                      All Post                                                           Next Post




Posted in | 2 comments

What IS IL ??

Intermediate Language is also known as MSIL (Microsoft Intermediate Language) Or CIL (Common Intermediate language).All .Net Source Code is Complied to Intermediate Language, This IL is then converted to machine code at the point where the Software is installed or at run-time by a just-In_time Comiler

(From .Net Interview Question  - Koirala)


MSIL Is the lowest level human readable Programming language in common Language Infrastructure and in .net framwrok.

What you Say About IL ??

Prev Post                                                      All Post                                                           Next Post

Posted in | 0 comments

Custom Error Handling in ASP.Net

Custom Error Handling in ASP.Net

There are often Required to Handle Error (Not Try Catch Handling) 
Which Mostly Genertaed by Server and Need to give
Custom Message on Page.And you Can Save This Error in EventView 
or You can Send mail to Administrator About
this Erorr Generated on Server.


In ASP.net 2.0 This Can be Done by making Small Changes in Web.Config,
Global.Aspx and One Error Page.



First Generate One Error Page Which Give User Friendly Message like


              We are very sorry for the inconvenience 
caused to you...

Second in Global.Aspx in Application_Error Section Generate One Event Log
Or you Can Mail Error 
to Administrator.

 void Application_Error(object sender, EventArgs e) 
    {
            // Code that runs when an unhandled error occurs
            Exception ex = Server.GetLastError();
            String errordescription = Server.GetLastError().ToString();
            string eventlogname = "Software_Error";
            if (EventLog.SourceExists(eventlogname) == false)
            {
                EventLog.CreateEventSource(eventlogname, eventlogname);
            }
            EventLog Log = new EventLog();

            Log.Source = eventlogname;
            Log.Clear();
            Log.WriteEntry(errordescription, EventLogEntryType.Error);

            //Here you Can Write Mail Message Coding Also
    }



In Web.Config Change CustomError mode on And ErrorPages to Your Error Page

< customErrors defaultRedirect="error.aspx" mode="On" / >


Prev Post                                                      All Post                                                           Next Post



Posted in | 1 comments

Upload File On A Server. (Code For File Upload On A Server ASP.net)

Upload File on Server.

 public void upload_cv()
    {
        if ((Resume_Upload.ToString().Trim() != ""))
        {
            string UploadPath = "";
            string encry_path = "";
            string file_name = "";
            string file_extension = "";
            file_name = Resume_Upload.PostedFile.FileName.ToString();
            file_name = file_name.Substring(file_name.LastIndexOf(@"\") + 1);
            file_extension = file_name.Substring(file_name.LastIndexOf(".") + 1);
     if ((file_extension.ToString().ToUpper() != "DOC") 
|| (file_extension.ToString().ToUpper() != "PDF") || 
(file_extension.ToString().ToUpper() != "RTF") ||                  
     (file_extension.ToString().ToUpper() != "TXT"))
            {
          
                try
                {
         //Upload file on A Specific folder.

    UploadPath = Server.MapPath(Request.ApplicationPath + @"\upload\");
     
     Resume_Upload.PostedFile.SaveAs(UploadPath + file_name + "." + file_extension);
                        }
                    
               catch (Exception ex)
                    {
                        lbl_error.Text = ex.ToString();

                    }
             }
        else
        {
            lbl_error.Text = "Please Upload MS Word file(.doc) only";


        }
    }}




Just Call Above Function.On Some Event.HowEver You Can Also Make Security tricks to protect your file From hacker For that you Can Make File name Encrypted.


Enjoy !!!!!!!!!1

Prev Post                                                      All Post                                                           Next Post



Posted in | 0 comments

Site Map







Invalid post back or callback argument,Asp.Net 2.0

 

Grid view


What is IL ?

 

Custom Error Handling in ASP.Net
 
Upload File on Server. (Code for File upload  in ASP.Net)
 
Connection String :- Asp.net Application with MS Access
 
Dynamic change URL of Web Service
 
ASP.Net Problems and Solution :-
 
            invalid parameter accessor: 1 BADBINDINFO.
                  CrystalReport 10.0 Dynamic Image Display Problem 
 
Date Time Format In SQL Server and MS Access.
 
Encrypting and Decrypting Configuration Sections in   web.config
 
Encryption and Descryption class in Asp.Net
 
Treeview Example in Asp.Net 2.0
 
Tab control in Asp.net Without third Party control 
 
Open child Window From Parent Window using Java script and on closing refresh.
 
Maintain Check box State in Grid view While Paging in Asp.net
 
Desktop Application run from Web Application on Server and Pass Arguments.
 
Sending email using Asp.Net 2.0
 
Merge Cell In grid view Header in Asp.net 2.0 
 
Highlighting the current menu item From Collection of menu  Items
 
Coding to Populate State and city According to State Selection Without Postback
 
Convert Image to byte array and  byte array to image in Asp.net
 
Bookmark in Asp.Net
 
Submit you Idea
 
Ask Your Question 
 
Share Good Documents


 

Posted in | 0 comments

Connection String Asp.Net With MsAccess



Connection String
Connect Asp.Net Application With MS Access.

First Open Web.Config of your Application and Write Down Following Code in Web.Config File.

in appSettings tag
add key="constr" value="Provider=Microsoft.Jet.Odbc.4.0;DSN=resume;User Id=admin;Password=admin;"

end appSettings tag

Now open your Application and write down following Connection String

OdbcConnection Objcon = new OdbcConnection(ConfigurationManager.AppSettings["constr"]);

Now Objcon Object you can use as Connection Object

if any query then just reply me.

Prev Post                                                      All Post                                                           Next Post



Posted in | 4 comments