Lets Have a fun with Technology.

BTemplates.com

Follow by Email

Saturday, July 18, 2009

Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application


Problem :-
"Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application"

Solution :-


                This type of error msg you get when you are using Windows dialog box (Message box) to display message in it.

                if you are running application from local you not getting this error message but when you run this application form network you get this error msg.This because when you use windows message box it's interact with current running windows and for interaction windows required adminsistrator or Similar type prevailing user . instead of this use label to Print error or use java script alert or confirm.

                please reader write when you get this error msg in below comment box.








Saturday, July 11, 2009

Export Data in Word document from ASP.Net With Formating


Hello Frd's

It's easy task to Export Data in Word Document from asp.Net . look at below code.This Code Export Data in Word Document With Bold,Color ect ... Feature Whatever you do with HTML Table Data.



        Response.Clear();
        Response.Buffer = true;
        Response.AddHeader("content-disposition", "attachment;filename=Adfield.doc");
        Response.Charset = "";
        Response.ContentType = "application/vnd.ms-word ";


        //txtad.Value = str;
        StringWriter sw = new StringWriter();
        HtmlTextWriter hw = new HtmlTextWriter(sw);
        HtmlForm fr = new HtmlForm();
        HtmlTable TLB = new HtmlTable();
        TLB.Style.Add("Border-width", "1px");
        HtmlTableRow hdr = new HtmlTableRow();
        HtmlTableCell cell = new HtmlTableCell();
      
            // Take data From Database and Write with format


            hdr = new HtmlTableRow();
            cell = new HtmlTableCell();
            cell.Style.Add("BACKGROUND-COLOR", "Gainsboro");
            cell.InnerHtml = "Client Name";
            hdr.Cells.Add(cell);
            cell = new HtmlTableCell();
            cell.InnerHtml ="";
            hdr.Cells.Add(cell);
            TLB.Rows.Add(hdr);


     //At last


            fr.Controls.Add(TLBdetail);
           this.Controls.Add(fr);
           fr.RenderControl(hw);
          Response.Output.Write(sw.ToString());
          Response.Flush();
          Response.End();




Friday, July 10, 2009

Thursday, July 9, 2009

Where to Buy Domain name


Every web master has a question from where to buy a domain name. Now a day domain booking is a normal process some booked domain for their business, some booked for personal use, some booked for social activity.

For any reason every day there are thousands of domain name booked every day. There are lots of domain Provider site which booked our domain name but necessary thing is payment and billing address. For that I am always follow godaddy.com. godaddy.com booked my domain name within a minutes.

I am not suggesting godaddy.com because of it is famous in word but it is one of greater solution for domain and space. They provide Support also very fast and answer goes to our
Solution.

I am always prefer it if you have any other then post on a comment with feature they provide and facility.

Wednesday, July 8, 2009

Search Result



What is MVC (Model view Controller)



MVC is framework methodology that divides application into three components roles.
Model
View
And Controller
1.       Model
Model in MVC based application are component which maintain the state. Often this state is persisted inside a database.
2.       Views
Views in the MVC based application are the components responsible for displaying the application user interface.
3.       Controllers
Controllers in MVC based application are the components responsible for handling end user interaction, manipulating the model and ultimately choosing a view to render to display UI. In MVC view is only to displaying information it is controller that handles and response to user input and interaction.
The Basic Diagram for MVC can be given by