|
To the best of knowledge
You have the web form, which is HTML and combinations of asp.net objects, similar to a PHP page
and code behind forms, that you write code in. asp.net objects can link to code behind using handlers, that point the code to the web form object.
The objects in asp.net, can be used 2 ways, on the web form as a HTML type of element, or in code behind in pure code.
When you run your project, asp.net will compile your code as various DLL files, and store them on the c drive under windows\Microsoft asp.net.
To debug your project, you press F5 using Visual Studio, you have to load the page you want to debug first, and set a break point by pressing F9 on the line of code you want. I think you can only debug code behind pages.
|
|
|
|
|
the file is https://www.seattleu.edu/admission/nonMatricLander.aspx
and out on the server there is just the aspx file and the accompanying .cs file
that is all there is. There is no solution file, there is no default.aspx file there is nothing else in the that directory apart from other .aspx files and aspx.cs files.
If it was a web form, there would be a project file and and or a solution file. There would be something compiled, right? There is nothing like that. there are no dll files.
How do I run the code?
My point is that there is no project to load. There is only a file.
After setting a break point, there is nothing to run. I have tried attaching to the browser that has the aspx code loaded but then the breakpoints become inactive.
|
|
|
|
|
You can only debug a project or page that is on your hard drive, if the page you posted is crashing, then you have to look at the stack trace, and work your way down the list to find the line of code that bombed.
[edit]
are you trying to reverse engineer the page?, or seriously need to fix something?
modified 20-Mar-13 23:34pm.
|
|
|
|
|
I think I need to do this. I need to run the code locally through "localhost" and attach the process through the debugger. How do I run the localhost?
|
|
|
|
|
If the project is on your hard drive, and your using VS 2010, you press F5 on the page selected, and it will run on the localhost.
What are you trying to fix, is it a javscript issue, or asp.net code behind.
|
|
|
|
|
Hello folks,
I thought this would be very simple. but I am not able to.
I tried simple code like this using href element. But it tries to open the sheet.xls in the browser window and says it can't find the file. I want the excel file to be opened in excel (not browser). Any suggestions?
<a href="file://domainname/vol1/destinationfiles/sheet.xls" >some excel file</a>
The excel file I am trying to open is not on IIS server. It is on file server.
Thanks much
nath
.
|
|
|
|
|
Where do you expect the excel file to run? On the server side?
Remote launching of apps at the client end is possible, but I doubt that you can do this directly (see below) from web server code. Also presumes they have Office installed on the remote machine.
Remote execution needs to be enabled/allowed at the far end.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Strange. I also thought it was easy.
But on my system, every call to a href="file:..." fails when the page containing the link was obtained via http.
Such links do work only when the page was opened with the file protocol. And the links do fail when the file to be opened is not on a local or mapped drive. Browsers offer to open the file (with Excel) when it is on a local/mapped drive or just download it.
I tested with current versions of Internet Explorer, Firefox, Chrome, Opera, and Safari.
|
|
|
|
|
Well I've never had to try it,
The web server would most likely need to generate a local script with *application name hard coded*, then execute via a shell COM object. The local script can then do some remote checking of its own, and then launch the remote application. (Windows Script Host)
That's how I would try to do it.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
After export gridview to excel using asp.net and vb.net
Save as Type:Web Page. I want it should be Microsoft Office excel workbook
My code like this
====================
gvRpt.AllowPaging = False
gvRpt.GridLines = GridLines.Both
Dim style As String = " .text { mso-number-format:\@; } </script> "
Response.ClearContent()
Response.Clear()
Response.Buffer = True
Response.Charset = ""
Me.EnableViewState = False
Response.AddHeader("content-disposition", "attachment;filename=" & RptName & ".xls")
Response.ContentType = "application/excel"
'Response.ContentType = "application/vnd.ms-excel"
Dim sw As New StringWriter()
Dim htw As New HtmlTextWriter(sw)
gvRpt.RenderControl(htw)
Response.Write(style)
Response.Write(sw.ToString())
Response.End()
|
|
|
|
|
try below code.
gvRpt.AllowPaging = False
gvRpt.GridLines = GridLines.Both
Dim style As String = "<style> .text { mso-number-format:\@; } </script> "
Response.ClearContent()
Response.Clear()
Response.Buffer = True
Response.Charset = ""
Me.EnableViewState = False
Response.AddHeader("content-disposition", "attachment;filename=" & RptName & ".xls")
Response.ContentType = "application/vnd.ms-excel"
Dim sw As New StringWriter()
Dim htw As New HtmlTextWriter(sw)
gvRpt.RenderControl(htw)
Response.Write(style)
Response.Write(htw.ToString())
Response.End()
hope it works.
Vande Matharam - Jai Hind
|
|
|
|
|
What is the Different my code and this codde?
|
|
|
|
|
Also you did not see it on the first view? Just one variable in one line was changed:
Your line is:
Response.Write(sw.ToString())
His line is:
Response.Write(htw.ToString())
I.e. sw was replaced by htw .
|
|
|
|
|
Blank Excel File generated.
|
|
|
|
|
Hello All,
I am having issues with maintaining info when person uses browser back button. I work for a company which is an online traffic school course. The issues I am having is say a student starts on lesson 1. Within lesson 1 there are 10 pages of content that they must read and click Next button to go to next page. Once they then have read all 10 pages, then they go to a quiz where they are given one question at a time (there are 5 questions). They click Next button to move to each question. Once they have answered all questions, then they go to a grade page. If they passed, then they click on continue button to go to lesson 2. Then onto quiz for lesson 2. This part all works great and if they click our programmed Back buttons everything works great as well. The problem is if they go from say lesson 1 all the way to lesson 3 (just an example) and they decide to use the browser's back button to go all the way back to lesson 1, everything tends to get messed up. Since we are driving off of class Student which contains current lesson num, current page num, current question num, once we advance further in the course these values get updated. My problem is that when the student continuously clicks the browser's back button the lesson num, page num and question num (and other content) does not follow suit to what it was. I am not sure why, but the pages are not being cached. Is there anyway to maintain the lesson num, page num and question num as the student clicks browser back button? Meaning as they click back to quiz from lesson 2, it shows lesson 2 (it is currently showing lesson 3 since that is how far have advanced) and same with the lesson pages that they must read. I have tried to use hidden input, but it does not seem to work correctly all the time. Any ideas???
Thanks,
Brad
|
|
|
|
|
I ran into that with eCommerce checkout, in which they move forward, and then go backwards. Then when they use the browsers back button, I lost some data.
I had to rethink the design of the checkout. I had the basic foundation correct, but had to make some modifications.
Your probably going to need to add a column to your table, lesson complete as boolean, and not allow the student to change lessons until completion, in a linear manner.
So if no lessons are complete, they can only access lession 1, and so forth.
|
|
|
|
|
I am not sure that I quite follow you. The students cannot move to next lesson with out moving through all of the pages of the lesson content and passing the quiz. So they do move forward in a linear manner. The problem is if they go all the way through lesson 1, pass lesson 1 quiz, now they go to lesson 2. If they now click the browsers back button all the way back to lesson 1 quiz question 1, that is where I seem to notice the problem. It shows lesson 2 quiz question 1. I would have thought that all the previous pages would be cached as the student clicks browser back button since it is only client side and is not going back to the server to retrieve any info. But for some reason it is not caching all of the pages. Is there a limit to the number of pages that will be cached?
|
|
|
|
|
Well you don't let them go back to lesson 1.
You place a catch function in the page.load event of every page, that validates if that lesson was completed, and if so, it redirects them back to the lesson menu or a sorry page, then another redirect to the lesson menu.
[EDIT]
You have to think 2 ways, one using your back and forward buttons, and one using the browsers back and forward buttons.
So you add some extra code for every lesson page, that first validates access to the page using the browser buttons.
One other thing to consider is condensing the entire lesson into a single page, using Javascript to control lesson panels or containers, so containers just open and close and they don't have to leave that page.
[2nd Edit]
Saving Page Number, Lesson Number data
You can save that in the session, but if they leave and come back, then the session number has to match, if they clear there browser cache, then the session is gone. The cache last as long as the browser will store it, or reaches it's storage limit, or until it's erased.
In my opinion, each page has to be independent in operation, in other words, the page has to be able to remember or fetch the data needed to pick up where it left off, without dependence of the previous page.
So overall I'm saying that it can't be fixed with something easy as remembering data in the session or querystring, it's at the program design level, in which each time an action occurs, it should update the table, and you check the table to figure out what level and lesson they are on.
modified 19-Mar-13 16:53pm.
|
|
|
|
|
I have a MVC 4 application which I've added some administrative pages implemented as WebForms.
The application starts on the Home controller, Index view, where I have a link to one of my Admin pages.
<a href="~/AdminUtils/WebForm1.aspx" title="Form 1">Webform1 Here </a>
The link works correctly because my page is redirected to the Webform1.aspx page. The problem is that the resulting URL I see in my browser is:
http://localhost:63163/#/AdminUtils/WebForm1.aspx[^]
Notice that there is a # (hash) symbol in the URL. The problem I'm having is that I have a 3rd party Grid on that page which is not operating correctly. If I manually change the URL to remove the # symbol, then the grid works perfectly.
Anybody know why this # symbol is showing up in my URL ? How can I get rid of it ?
Thanks.
|
|
|
|
|
|
Hi All,
I am using below bat file which should return output text as URLs which are NOT browsable(eg. page not found error) but it is actually returning all successful ping in output text.Please help me to modify my bat file:-
@ECHO OFF
SET output=FaultyURLs.txt
IF EXIST "%output%" DEL "%output%"
FOR /f %%a IN (URLs.txt) DO (
CALL :ping %%a
)
GOTO :EOF
:ping
ping -n 1 %1 | find "Approximate round trip" >NUL || ECHO %1>>"%output%"
ECHO URLs SCANNING COMPLETED
ECHO
PAUSE>NUL
|
|
|
|
|
Although this has nothing to do with ASP.NET I suggest the following for capturing the unknown addresses :
FOR /F %%a IN (urls.txt) DO (
ping -n 1 %%a | find "Approximate round trip"
if errorlevel 1 echo %%a >>"%output%"
)
Use the best guess
|
|
|
|
|
Thanks Richard.
But it is not solving my whole problem.
using ping helps for main website link like www.bestbuy.ca
but doestn't work for www.bestbuy.ca/officejetpro.
Please let me know how can i ping sub-links like http://www.bestbuy.ca/officejetpro
Thanks
|
|
|
|
|
Of course not, that is not what ping is designed for. If you want to check individual web pages then you will have to write a program that sends and receives HTTP messages. Try a search of the articles section[^] for some examples.
Use the best guess
|
|
|
|
|
Hi,
Using Visual Studio 2012 Ultimate on Windows 8 64 bit Virtual Machine
Using Oracle Database 11.2.0.1 Enterprise Edition
I want to develop a web page with a gridview on it which will be populated with Oracle database's 4 tables having all features like add, delete and edit the rows without pressing update/cancle link buttons which I found on my google links. Gridview must have radio button, dropdownlist, textboxes, checkboxes and datatime control with it. The control's values are to be populated from different tables join on a common column customer_id number(5).
When I google for it, I found many good links like :
Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List[^]
and
Editable GridView in ASP.NET 2.0[^]
and
many more.
I am not going to request you to provide me the complete code (like spoon feed), but if anyone can share with me link(s) for it, I shall be thankful to you, in which different controls are being populated from different tables and that grid view should be available for update without any click on further link/button etc.
How it should function :
Suppose below is Grid view looks:
Customer_Id (TextBox)
Registered On (DateandTime Control)
Status (Radio Button)
Country (DropDownList)
Phone (TextBox)
Services (CheckBoxes)
Customer_Id from all 4 tables.
Registered On from Reg_Master table
Active from Customer_Active table (customer_id, status number(1)); If status = 1 then it is active, else inactive)
Country from country_master table (customer_id,country_name)
Phone from cust_phone table (customer_id,phone_no)
Services from service_list table (customer_id,service_code) [Dynamic, i.e. 1 to 20 services are there] and parent table service_master table (service_code, service_name)
Now, if user changes status as inactive to active or vice versa, so its effect should only be in customer_active table. If user changes country from country1 to country4 and check/uncheck on its existing service, then its impact should be on country_master and service_list table only.
I am not sure, how good and clear I am asking the question, but if still I am unclear in my request, please let me know.
Thanks and Regards
Girish Sharma
|
|
|
|
|