Quantcast
Channel: Off-Topic Posts (Do Not Post Here) forum
Viewing all 14169 articles
Browse latest View live

What is optimum approach to generate reports in ASP.NET MVC Web Application

$
0
0

I'm creating ASP.NET MVC 5 application. In that application I have simple form and table like following 

                     

As soon as I click "Generate Report" button I want to generate above table on report view and then I able to download it as PDF or Microsoft Word file

What is the best solution for this task

1. Crystal Reports 

2. Telerik Reports

3. Or Any other proper solution 

later I'm planning to add pie chart , bar chart for this reports , So really appreciate suggest a solution that will be compatible with ASP.MVC 3 or Higher Versions.



Cant open xlsx file using Asp.net/C# app.

$
0
0

HI,

I am using upload file control from asp.net and trying to read xlsx file but I am stuck with problem "External table is not in the expected format". I can upload xls files. I tried various connection strings. Did I miss any thing in xlsx connection string?

  private void ExcelConn(string FilePath)
        {
            string extension = Path.GetExtension(FilePath);
            //constr =
            switch (extension)
            {
                case ".xls":
                    
                    constr = string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}; Extended Properties=""Excel 8.0""",FilePath);

                    break;
                case ".xlsx":
                    constr = string.Format(@"Provider=Microsoft.ACE.OLEDB.12.0; Data Source= {0}; Extended Properties=""Excel 12.0 Macro; HDR=YES""",FilePath);

           
                    break;

            }
            Econ = new OleDbConnection(constr);
        }

        private void connection()
        {
            sqlconn = ConfigurationManager.ConnectionStrings["SqlCom"].ConnectionString;
            con = new SqlConnection(sqlconn);
        }


        private void InsertExcelRecords(string FilePath)
        {
            try
            {
                ExcelConn(FilePath);
                var dsExcel = new System.Data.DataSet();
                DataTable dtExcel = new DataTable();
                OleDbCommand MyCommand = new OleDbCommand();
                //Select Taxable Vehicles from sheet[VECHILE DETAILS]
                OleDbDataAdapter da = new OleDbDataAdapter("select * from [Sheet1$]", Econ);
                da.Fill(dsExcel);
                dtExcel = dsExcel.Tables[0];
                connection();
                //creating object of SqlBulkCopy    
                SqlBulkCopy objbulk = new SqlBulkCopy(con);
                //assigning Destination table name    
                objbulk.DestinationTableName = "TestEmployeeinfo";
                //Mapping Table column    
                //objbulk.ColumnMappings.Add("id", "id");
                objbulk.ColumnMappings.Add("Name", "Name");
                objbulk.ColumnMappings.Add("City", "City");
                objbulk.ColumnMappings.Add("Address", "Address");
                //inserting Datatable Records to DataBase    
                con.Open();
                objbulk.WriteToServer(dtExcel);
                con.Close();
            }
            catch (Exception)
            {

                throw;
            }
        }

        protected void btnImport_Click(object sender, EventArgs e)
        {
            string CurrentFilePath = Path.GetFullPath(FileUpload1.PostedFile.FileName);
            InsertExcelRecords(CurrentFilePath);
        }

 

 

media player to HTML5 audio playback

$
0
0

Hello All,

Currently I am trying to move some older web code to HTML5. The particular code has to do with playing audio files. Previously the browser would open windows media player, and pass it a URL in the following format:

https://machine:123/media/ticket/execute?{DF394DDF-FD50-41CB-B4BE-2240AFD55392}.

Windows media player would then know what file it needs to play.

I have tried the the following code in HTML5:

<audio width="512" height="288" controls="controls"><source src="https://machine:123/media/ticket/execute?{DF394DDF-FD50-41CB-B4BE-2240AFD55392}"/></audio>

The result is that the player shows up on the page, but it does not play. It fails with an error message "invalid source".

I have spoken to some developers who were involved with the media player development initially, and they say the file being rendered is a wav file. 

I am at a loss of what to try next.

IIS w/ PHP (Group Authentication)

$
0
0

Greetings,

I am attempting to grant users in a trust domain (windows 2012) access to our intranet (another domain running 2003 - trusting domain) without having to re-authenticate to the actually web page. Their is currently a trust between the two domains.

Upon review, I can navigate to the security group of the trust domain, however, once i have applied the specific group, the users within that group still are required to enter in the passwords. The current mode is setup for Windows Authentication enabled.

Current Environment:

Windows 2008 Standard

IIS Version 7.0.6000.16386

Any help is greatly appreciated.

Deon

windows 10 on surface pro 3

$
0
0
I'm writing this because I couldn't wait for Windows 10. I upgraded to it on my surface pro 3 and have had a bunch of annoying issues. So much so that I went back to windows 8. My mail wont display attachments, it constantly keeps asking me to re-log in to prove I'm me, and one time when my keyboard wasn't attached, the on screen keyboard wouldn't show so I could log on. I would think MS would have a new OS running flawlessly on their signature tablet, but I have to say I'm very disappointed. When they release the first service pack maybe I'll reinstall it, or maybe i'll just go to apple.

steam compatibility

$
0
0
my Steam games are no longer compatible. Borderlands 2 now runs quite poorly, and it is not a graphical fault, I have adjusted the settings to the lowest possible and still suffer the same slow down. Another title, Metal Gear Rising: Revengeance (ridiculous title aside) will not run at all, now that windows 10 is installed. How can I fix this situation as I look forward to playing these and other games on my PC but do not know which other titles will be unplayable?

How to list Outlook emails into Excel using VBA on Mac Office 2011

$
0
0

Hi there,

I am new to VBA and office on Mac so I would really appreciate all kind of help. I am trying to write a Macro to list the emails (email sender, subject, etc) from Outlook in Excel in Mac 2011. However, there is no Microsoft Outlook 14.0 Object Library in my references and because I need to use the Outlook.Application in the macro , I cannot get it to work. 

I was able to send an email through excel VBA with the help of the following link but how can I use this to read emails from Outlook ?

https://msdn.microsoft.com/en-us/library/office/Hh859489(v=Office.14).aspx

Thanks


windows update not working in windows 8.1

$
0
0

my windows totally sucked...

its update is not working.

its windows store is not working

media player is not working

what to do?


Asp.net

$
0
0

please  tell me 

Deployerment means


Office Documents hang when trying to open from SharePoint

$
0
0

Right Oh!  So here is my situation...


I have a SharePoint Server 2010 (enterprise), I have Windows 7 clients, we are using IE 9.


I go to a SharePoint site, left click on a link for a word document in a Document Library, and the Word Document window sits for a little bit then lets me know that Word is Not Responding. 


If close out that window (usually have to end the process as well manually), and then go to the same Document Library, and the same Word document, only this time I "right click" and select open, the window pops up in IE asking if I want to ope or save the document....select open.... the document opens just fine.


I am not a SharePoint guru.  That person is long gone, and I have been thrown into the fire on this issue to see it resolved.  I have informed the managers to pass along the use of the "right click" select open method, but the business is not thrilled with this and wants the users to be able to simply click on the link and have the document open.  Which I can understand I suppose.


So my question is.....


1.  Has anyone else seen this type of behavior before?



I am more than willing to dig around at whatever level to find additional information to help re-mediate this problem, it just might take me a hot minute as I stated earlier...not a SharePoint guru....had nothing to do with the build of the server, db, or sites....was just told to get in and make it work.


I really appreciate any additional thoughts, avenues, or even goose chases that I can be sent on at this point as I am just at my breaking point with this. 



Thanks again!


Can't watch movies off the DVD player in my laptop

$
0
0
I updated  to windows 10 and one problem occurred. When I slid a DVD into my laptop i don't get a prompt to choose what to do with the dvd. Nothing. do I need to download something like Flash Player???

The underlying connection was closed: The connection was closed unexpectedly while uploading file to sharepoint document Library Using HttpWebRequest PUT Method in asp.net

$
0
0


Hi,

We are getting below error while uploading file to sharepoint document Library Using HttpWebRequest PUT Method in asp.net.

Error Message : The underlying connection was closed: The connection was closed unexpectedly.

below is my code to upload file to sharepoint document Library Using HttpWebRequest PUT Method.

Please Suggest.


string dateFormat = DateTime.Now.ToString("MMddyy");  

string FileName = OutputFileName + dateFormat + ".xlsx";   


string uploadedFilePath = Path.Combine(OutputPath, FileName);           


string sharePointListPath = SharePointSiteURL;          


HttpWebResponse SPOResponse = null;         


HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(sharePointListPath + FileName);           


try


            {

                request.ProtocolVersion =


HttpVersion.Version10;

                request.KeepAlive =


false;

                request.Timeout = 1000000000;

                request.ReadWriteTimeout = 1000000000;

                request.Proxy =


WebRequest.GetSystemWebProxy();// WebRequest.DefaultWebProxy;


                System.Net.


ServicePointManager.Expect100Continue = false;

 

               


NetworkCredential nc = new NetworkCredential(wsgSettings.ServiceAccountUserID, wsgSettings.ServiceAccountPassword);

                request.Credentials = nc;

                request.Method =


"PUT";

               


byte[] buffer = new byte[4096];

                               


using (Stream stream = request.GetRequestStream())

                {

                   


using (FileStream fsWorkbook = File.Open(uploadedFilePath,

                       


FileMode.Open, FileAccess.Read))

                    {

                       


int i = fsWorkbook.Read(buffer, 0, buffer.Length);

                       


while (i > 0)

                        {

                            stream.Write(buffer, 0, i);

                            i = fsWorkbook.Read(buffer, 0, buffer.Length);

                        }

                    }

                }

                SPOResponse = (


HttpWebResponse)request.GetResponse();

                SPOResponse.Close();

                            }

           


catch (Exception ex)

            {              


            }

           


finally


            {

                request.Abort();

            }

 

DreamSpark subscription for Azure is not apperaring in my Subscriptions in VS2013 Professional

$
0
0
I have a DreamSpark subscription for Azure but when I create a new MVC application and try to host it in Cloud my subscription doesn't appear in the list.

Windows 7 giving message "Not genuine windows"

$
0
0
Need help, trying to register for my free copy of windows 10 but my windows 7 is giving strange error saying that I do not have a genuine copy installed. What do I do?

More actions

$
0
0
How do I find the More actions drop down menu box on Windows 10?

Desktop duplication

$
0
0

I use directX(GetFrontBufferData) to capture screen  but it cost 70 ms to capture a frame in my platform.

Is there any other method which faster than this function?

I find a sample which can do ithttp://code.msdn.microsoft.com/Desktop-Duplication-Sample-da4c696a

Does this sample only support win8?

How much time it cost to capture a frame?

If I want to do screen capture by WDDM. Is there any sample?

Thanks


forums count

$
0
0
Hello i would like to know the number of FORUNS of the MICROSFT COMMUNITY?....thanks in advance.....

desktop scroll bar width

$
0
0

In Windows 10

The current width of the scroll bar (to scroll the menu icons) on the desktop is so miniscule and

narrow..it makes scrolling with the mouse very difficult to do.. the width should be twice what it is.  I used regedit to change the key values under  hkkeyUser/controlpanel/desktop/windowmetrics/scrollwidth from -255 to -400

All that did was change the scroll bar width in windows explorer where i view my files.. but not on my destop start menus.

Question: how do I change it?

No, windows 10 is not easier to use. Currently, it is clunky, internet speed is very slow compared to my lessor laptop with vista that is 10 years old.


Asp.Net MVC FileResult if not file exists

$
0
0

Hi Experts, 

I have written an Action with return type as "FileResult" which takes Parameter as ID. For some ID the file may not exists. It downloads the file if exists. But if no file exists then I want to show a message on the screen that "File does not exists" and the control should stay on the same page. I am using Asp.Net MVC 5 framework

How can I achieve the same ?

Visual Basic for Psychology Experiments Resources

$
0
0

Hello,

I was wondering if there are any good step-by-step tutorials for making psychology experiments using Visual Basic 2010 available online?

Thank you.

Viewing all 14169 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>