webforms

How to create a ASPX file after clicking a button on another form

风流意气都作罢 提交于 2020-01-06 05:35:24
问题 Hopefully this is clear enough, i have this bit of code : private void BtnAdd_ServerClick(object sender, EventArgs e) { var path = @"C:\Users\User\Desktop\Demo\Demo\" + BtnName.Value; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } } That creates a folder named after the value of a text box, and i need to know if there's a way to create an aspx file the same way, and save it in one of those folders or anywhere it just needs to be accessible to the project, thanks in advance!

Message from webpage undefined

我怕爱的太早我们不能终老 提交于 2020-01-06 04:42:23
问题 I am returning a simple string from a webmethod to a Javascript function. I am using an AJAX enabled website in ASP.NET 2.0. I get the date in firefox but inside IE 8 it returns undefined . Do I have to parse the string in the JSON format using some serialize class? In my webmethod, I am just using: return DateTime.Now.ToString(); $(document).ready(function(){ var pageUrl = '<%=ResolveUrl("~/test/test.aspx")%>'; // Test $('#<%=trgNo.ClientID%>').change(function(){ var trgId = $(this+'input

WebForms Forms Authentication: Request.IsAuthenticated=false after successful log in and redirect

半城伤御伤魂 提交于 2020-01-06 04:30:06
问题 I'm having a real bad WebForms day today! I have a mature WebForms web application using Forms Authentication. For some unknown reason my application has started to show Request.IsAuthenticated (on the Application_BeginRequest function in Global.asax ) despite going to the login page, logging in successfully and calling FormsAuthentication.RedirectFromLoginPage() . I just can't work out what is going wrong. Here are the checks that I have done. I am hoping someone might point out something I

Refresh aspx page in ASP.NET tab panel

久未见 提交于 2020-01-06 04:24:45
问题 On my ASP.NET page I am using an iframe and setting its source in code behind the page. Markup <asp:TabPanel ID="tabDocs" Enabled="false" HeaderText="Documents" runat="server"> <ContentTemplate> <iframe width="100%" height="600" id="frmDocs" frameborder="0" runat="server"></iframe> </ContentTemplate> </asp:TabPanel> Code Behind frmDocs.Attributes.Add("src", "/xyz.aspx?vType=EmpRpt&vid=" + EmpID.ToString) There is a Create Report button on the page, which will save a report in the database and

Can I recreate the source code and solution files for an ASP.NET website?

≯℡__Kan透↙ 提交于 2020-01-06 03:28:04
问题 I have a client that had an ASP.net web-forms website built for him. He is not able to contact the original developer, but he would like to make some changes to the website (adding pages and changing existing ones). I have the production files from the ftp site, but that is all that I am able to retrieve. Is it possible to create the source code and solution files with only the production files, or does he have to start over from scratch with the site? 回答1: Depends on what kind of web-forms

HTTP Error 403.14 - Forbidden (simple Web Form)

笑着哭i 提交于 2020-01-06 02:21:10
问题 I am writing a simple web form app that retrieves data from xml. It seems like I tried everything that was recommended as shown in the picture but error still exists. Used IIS Express to solve the problem but it just doesn't work. Please help. 回答1: Update Actually it is possible that you just need to set a default page for your application. You can right-click at a page in your application then select Set As Start Page First Answer Try to run in c:\Windows\Microsoft.NET\Framework64\v4.0.30319

Change Value Of A Field On Submit Using Javascript

耗尽温柔 提交于 2020-01-05 22:53:45
问题 I would like to add some JavaScript to do the following. I would have 3 fields like this. <input type="text" name="a" /> <input type="text" name="b" /> <input type="hidden" name="c" /> say if I entered 100 in the first field and 19 in the second field. it would divide 100 by 19 and round it up to no decimal places, and then replace the value of the third hidden field by the answer, so in the case it would be (100/19) 5.26... rounded up to 6 however I am not sure how to actually implement this

Win32 Exception Error: The Parameter was incorrect after deploying to GoDaddy

怎甘沉沦 提交于 2020-01-05 19:36:29
问题 I have ran into an issue with this error. Here is the rest of the StackTrace (the first line of it, let me know if I need to provide the complete StackTrace ).. [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 -

Win32 Exception Error: The Parameter was incorrect after deploying to GoDaddy

元气小坏坏 提交于 2020-01-05 19:36:10
问题 I have ran into an issue with this error. Here is the rest of the StackTrace (the first line of it, let me know if I need to provide the complete StackTrace ).. [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 -

mvp session response request

核能气质少年 提交于 2020-01-05 10:34:57
问题 I am using the Model-View-Presenter pattern in my project web and now I am with a doubt. How I do to treat session and cookie this scenario? How I do to write file using "Response.WriteFile" for example? 回答1: I think the most typical approach (and, in fact, the one used by ASP.Net MVC) is to wrap the HttpContext in an abstraction (like IContext or something) which exposes whatever subset of context functionality you need to get access to. If your using an IoC container, then you can pretty