|
RajeeshMenoth wrote: so any one can hack immediately into the project
Since when does "open source" mean "less secure"? Having access to the source code does not mean you're going to know where all the weaknesses are. There are plenty of other things you have to do to the server that have nothing to do with the application code to properly secure the server.
|
|
|
|
|
I want to add navigation method in my project,but i am not able to add all navigation method Please give me coding of all method.
|
|
|
|
|
Yeah, that's not going to happen. There are simply too many different ways of doing navigation. All you have to go is Google for "ASP.NET navigation" and you'll come up with all kinds of ideas and 3rd party controls to do this.
|
|
|
|
|
Hi... run time i'm getting error as "Uh-oh, something went wrong! Error Code: 500".
In web.config file, i specified custom error mode to "off": <customerrors mode="Off">
Then also i'm getting same error..
any help appreciated...!
Thank you
|
|
|
|
|
That is a custom error, designed by the developer (maybe you) to hide the actual error in the background.
The 500 tells the developer that there has have been some run-time error, such as some error that broke the code and threw this error. Try re-loading the website in your IIS to re-compile and start the website's settings from beginning. Then it would display the error.
(If you're using Visual Studio as your IDE)
Otherwise, a side-note can be to debug the website using Visual Studio. Add a breakpoint to your functions, and Visual Studio would help you in catching the errors.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Special credit for code below goes to the great Richard Deeming.
Originally, the code was intended to search by date range or specific date.
Currently, a couple of changes have been made to the code per user specs.
Search is now done specifically with date range using jQuery datepicker.
The range could be just one day or multiple days.
Requirement 1: User selects a begin date, let's say 02/22/2015 and end date 02/22/2015(1 day).
The user selection searches Reservations table to see if the date(s) user selected have already been used for prior reservations.
If the date(s) have been taken, present user with on month's worth of results including the taken dates.
If the date(s) have been taken, present one month's worth of results including the taken dates.
How do I modify code below to get it to work?
So far, I run the code and no results are displayed.
Thanks a lot in advance.
Private Sub showGrid()
Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("conString").ConnectionString)
Dim cmd As New SqlCommand("-placeholder-", conn)
Dim sb As New StringBuilder("Select siteID,siteName,AssetName,Capacity,AvailableFacilities,dateReserved,GroupStatus " & _
",amenities,RentalFeeAmount,ExtraHourAmount,DepositAmount,CancellationAmount,KeyDepositAmount, Duration " & _
" FROM ParksNRecsData WHERE siteId = @siteCode and capacity <= @roomcapacity and (CONVERT(VARCHAR(10), dateReserved, 101) >= @FromDate And CONVERT(VARCHAR(10), dateReserved, 101) <= @EndDate)")
cmd.Parameters.AddWithValue("@siteCode", ddlParks.SelectedValue)
cmd.Parameters.AddWithValue("@roomcapacity", ddlPartySize.SelectedValue)
cmd.Parameters.AddWithValue("@FromDate", txtFromDate.Text)
cmd.Parameters.AddWithValue("@EndDate", txtToDate.Text)
cmd.CommandText = sb.ToString()
Dim dt As DataTable = GetData(cmd)
If dt.Rows.Count = 0 Then
cmd.Parameters.Clear()
cmd.Parameters.AddWithValue("@FromDate", Date.Today.ToString("MM/dd/yyyy"))
cmd.Parameters.AddWithValue("@EndDate", Date.Today.AddMonths(1))
cmd.CommandText = "Select siteID,siteName,AssetName,Capacity,AvailableFacilities,dateReserved,GroupStatus " & _
",amenities,RentalFeeAmount,ExtraHourAmount,DepositAmount,CancellationAmount,KeyDepositAmount, Duration " & _
" FROM ParksNRecsData" & _
" where dateReserved Between @FromDate And @EndDate"
dt = GetData(cmd)
End If
gvCustomers.DataSource = dt
gvCustomers.DataBind()
End Sub
|
|
|
|
|
I need to convert html div content to ms word in below code C# Microsoft.office.interop.word.htmldivision add invalid parameter error occurred.
StringBuilder objStrBuilder = new StringBuilder();
objStrBuilder.Append("<table>");
objStrBuilder.Append("<tr>");
objStrBuilder.Append("<td>");
objStrBuilder.Append("HP");
objStrBuilder.Append("<\td>");
objStrBuilder.Append("<td>");
objStrBuilder.Append("HP computer");
objStrBuilder.Append("<\td");
objStrBuilder.Append("<\tr>");
objStrBuilder.Append("<tr>");
objStrBuilder.Append("<td>");
objStrBuilder.Append("HP Labs");
objStrBuilder.Append("<\td>");
objStrBuilder.Append("<td>");
objStrBuilder.Append("HP computer Joy");
objStrBuilder.Append("<\td");
objStrBuilder.Append("<\tr>");
objStrBuilder.Append("<\table>");
dic.InnerHtml = objStrBuilder.ToString();
Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
word = null;
try
{
object missing = System.Reflection.Missing.Value;
word = new Microsoft.Office.Interop.Word.Application();
object template = @"D:\\DS_Template11.dotx";
word.Documents.Add(Template: ref template);
word.Visible = true;
object readOnly = false;
object filename = "http://localhost:60510/tr/Default.aspx";
Microsoft.Office.Interop.Word.Document document = word.Documents.Open(ref filename, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
// Microsoft.Office.Interop.Word.Section wordSectio = document.Sections;
foreach (Microsoft.Office.Interop.Word.Section wordSectin in document.Sections)
{
foreach (Microsoft.Office.Interop.Word.HTMLDivision wordSection in document.HTMLDivisions)
{
String text = "this is footer";
//Get the footer range and add the footer details.
Microsoft.Office.Interop.Word.Section s1=document.Sections.Add(); ;
Microsoft.Office.Interop.Word.Paragraph p1 = document.Paragraphs.Add();
Microsoft.Office.Interop.Word.Range R1 = p1.Range;
Microsoft.Office.Interop.Word.HTMLDivision h1= R1.HTMLDivisions.Add();
h1.
R1.ContentControls=dic.
R1.HTMLDivisions = dic.InnerHtml;
//Microsoft.Office.Interop.Word.Range footerRange = wordSection.Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range;
Microsoft.Office.Interop.Word.HTMLDivision para = wordSection.HTMLDivisions.Add(dic.InnerHtml);
Range.Fields.Add(Range, Microsoft.Office.Interop.Word.WdFieldType.wdFieldHTMLActiveX);
modified 13-Feb-15 6:16am.
|
|
|
|
|
Is this a question, a proud boast, or just some spam?
|
|
|
|
|
Dude this is query sure if know the answer then reply plz
|
|
|
|
|
You still have not asked a question. Please edit your original post and add some proper detail about what problem you are trying to solve, and what errors or problems you are facing.
|
|
|
|
|
I need to convert an HTML Div which is made dynamically and run the page ,entire content of page should be converted into word document on client machine only
|
|
|
|
|
Did you understand what I mean by the statement: Please edit your original post and add some proper detail about what problem you are trying to solve, and what errors or problems you are facing.? Telling us what you want, is not an explanation of a problem.
Also looking at your code you are running some C# code using Microsoft.Office.Interop.Word . Is this running at the server or the client? If the latter then I do not think it will work.
|
|
|
|
|
how do I insert a word, pdf and text to sql database and view the files in gridview using vb.asp
|
|
|
|
|
The same way you would with another technology. Be sure to use a parameterized statement.
|
|
|
|
|
Because those documents can be large and contain images, you should consider storing them in a folder and just store the path string in the db, especially if your db budget is low.
|
|
|
|
|
i am reading pdf files saved on MSSQL server in form of byte array and trying to display in iframe. I am facing the problem. the first file I had opened is opening again and again even deleting cookies and clear up the temp folder. the code I am using is as below:
Dim RID As String
RID = Request.QueryString("RPTID")
Dim rptProp() As String = RPT.getReport(CInt(RID)) 'Reading file attributes from database using a function writtent in an other class.
If rptProp(6) <> "" Then
Filename = rptProp(7)
Me.Filename = Filename
Me.Extension = Mid(rptProp(7), rptProp(7).IndexOf("."c) + 2, rptProp(7).Length)
Dim doc() As Byte = Nothing
doc = RPT.getRepDoc(CInt(RID)) 'Reading exact file bytes stored in MS SQL database using a function getRepDoc(Document_ID as integer) written in another class designed for data communication between web forms and database.
If doc IsNot Nothing Then
If Extension = "pdf" Then
Dim base64String As String = Convert.ToBase64String(doc, 0, doc.Length)
Dim pdfIFrameSrc = "data:Application/pdf;base64,{0}" + base64String
' set the src attribute
Me.iFRM.ResolveUrl(pdfIFrameSrc) ' iFRM is an ID of iFrame
End If
End If
modified 12-Feb-15 5:17am.
|
|
|
|
|
I used the VS2013 Community Edition and created a new MVC Project, and one with the hero accent.
I customized it to my liking, to use as my new website and wanted to start adding web pages to it.
So I created a Controller AppsController.cs and a folder in Views called /Views/Apps
Then I created 4 view pages in Apps, one called MVC.cshtml
I get the page not found, or resource cannot be found when I type in
http://localhost:18525/Apps/MVC[^]
I think my understanding is correct, in which the controller finds the view file. But how does MVC know about the controller, to find the view file. Or perhaps I'm way off track here, and it's a routing issue.
I have no clue here on this
All the help on this says right click, add controller, but I don't get those choices in VS2013 or VS2012. Nor the Add View, I choose Add -> EmptyPage Razor V3.0
I'm not going to post any code since I'm sure what to post.
|
|
|
|
|
I created a new project, and put my stuff back in it to retain the design
Then I ran the NuGet, and updated all my packages
Figured out that I can't or don't know how to add a folder inside home view for /home/Apps
So I just added a new controller called Apps and a view /View/Apps for now.
The right Click works now add Controller, add view
And I have MVC version 5 now.
This is way different than web forms, but I can see the payoff in the future.
|
|
|
|
|
Hello, since you've not provided any code and/or any other background I am unable to guide you any further. Anyways, that link you provided is not applicable to my IIS and thus I am unable to examine the problem.
Anyhow, the problem is that beginners do get into this problem. I have an article[^], that you would find helpfull to you and you would find it easy to understand the ASP.NET MVC pattern, by using that example.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Well thanks for the offer for help. Really wasn't any code to post, because I didn't know what to post.
This is frustrating learning this, on top of CSS 3 and HTML5, but so far so good.
Here's what I have now. Keep in mind that I just started learning MVC this Monday, 3 days ago. So I thought why not update my website first, and see how it goes.
http://www.redcopper.net[^]
|
|
|
|
|
You should've posted the methods in which you're creating the application, the controllers and their representative views etc.
Anyhow, it doesn't take much time to understand the ASP.NET MVC pattern, you just need to first make yourself clear with the concept of the MVC pattern, and the code patterns in ASP.NET. Rest of the things would be learnt on the way. Mostly, 404 errors are generated when there is no file in your website to display in your browser, or none of the routings meet the URL.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
There must be a bond in which the controller is recognized, so it picks up the view.
Plus I found out the views must be in the folder that the controller makes.
Was sort of looking for the file in which this bond is made, unless it's a automatic search in the whole view folder structure.
|
|
|
|
|
Did you even read that article[^] that I tried to ask you to read? That has atleast the basic concepts of the ASP.NET MVC framework. You would get how and which pages are used in the MVC as the Views, how Controller acts and all other underlying things.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I did read your article.
I understand how it works
I had trouble with Visual Studio 2013, in which I wasn't able to get the same right clicks and menu choices as show in your examples.
I made the mistake of opening the project as a website, and not a project, so VS2013 didn't know it was a MVC App.
Now I open it as a project, and all is fine.
|
|
|
|
|
Hello Everyone,
Please i would appreciate any urgent answer/help on the above subject. Actually, am about to start working on a project that involves developing a website where registered employees (on a remote desktop application) can come and view their basic information.
I understand i need to make some API calls that would fetch the data from the remote desktop database and render it on html for the users.
Please can anyone provide me with useful tip/tutorial/guide/reference on how to start?
Thanks in advance.
IsoftTech
modified 11-Feb-15 10:16am.
|
|
|
|
|