|
hi, I am using an aspxbutton and webmodalanchor for opening a new pop up page.I am opening the page but when I want to close the page, the page is being closed two times.I think the page loading two times If I use an aspxhyperlink the page, is being closed normally.But ı want to use aspxbutton. Thanks..
|
|
|
|
|
Error 3 Metadata file 'F:\Tolet_05APR2012\BusinessLayer\bin\Debug\BusinessLayer.dll' could not be found Tolet
|
|
|
|
|
Is the file there or not?
V.
|
|
|
|
|
Error 1 A namespace does not directly contain members such as fields or methods F:\Tolet_05APR2012\BusinessLayer\BALtbl_Registration.cs 9 5 BusinessLayer
|
|
|
|
|
You cannot use fields or methods from a namespace directly.
eg. you have following class.
namespace ns_a{
public class A{
public string Str_a { set; get; }
public string method_a(){
return "one funky string here";
}
}
}
if you want to call field Str_a or method method_a from a class B you'll need to instantiate the class and call it from there:
namespace ns_b{
public class B{
public method_b(){
string str_b = ns_a.Str_a;
string result_b = ns_a.method_a();
ns_a.A class_A = new ns_a.A();
string str_b2 = class_A.Str_a;
string result_b2 = class_A.method_a();
}
}
}
Hope this helps. This is pretty basic stuff, are you following classes or reading a book?
V.
|
|
|
|
|
Hi,
I am working on an Asp.net MVc web application.In my application on dropdown change i am submiting form (calling a controller method), and in controller method I am assigning value to a Tempdata .From that controller, call will be redicted to aspx page where I will access that tempdata (which is assigned in the controller).Here I am facing the problem as my Tempdata value is coming as empty but If I keep an alert in jquery or debug the application I am able to get the tempdata value.So not able to understand what exactly is the problem?Can anyone please help me on this? tried putting Tempdata.keep() also but did nt work.
Thanks,
Vanita
|
|
|
|
|
im using microsoft visual c# express and its database.
through my c# program i wanted to retrieve a folder path from the database to select files.but im getting this error.please help.
i have created a column 'folder_path nvarchar(50)'
my folder path is : @"f:/pick_up"
if i put folder path as 'comp' it reads.i guess the error has something to do with special characters @,/ and ".
reply asap.thank you.
|
|
|
|
|
Please, pick one forum and stick with it. Don't cross post.
|
|
|
|
|
I am given an ASP.NET project. There is a page with export to excel button. I am shown that the export to excel button works in a machine with office installed and visual studio installed.
Now the project is moved to a new server. It has only IIS. The project works, but the export to excel does not work. I look at the connection string and find out it refers to Microsoft Jet. Could it be that I need to install Microsoft Jet to the new server?
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strNewPath & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=2"""
|
|
|
|
|
Hi,
Provider=Microsoft.Jet.OLEDB is a driver and it exists in every machine which has .Net framework installed but in order to export to Excel the machine needs to have Office Excel installed.
|
|
|
|
|
May I assume that you mean the client machine needs to have Excel installed?
|
|
|
|
|
Absolutely no. The exportation occurs in the app server so I mean your server needs to have Excel installed.
|
|
|
|
|
I have an error page set up and when an error occurs the page is not shown.
From my webconfig file:
<customErrors defaultRedirect="~/Error.aspx" mode="RemoteOnly">
<error statusCode="404" redirect="~/Error.aspx" />
<error statusCode="500" redirect="~/Error.aspx" />
</customErrors>
From my Global aspx file:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As Exception = Server.GetLastError().GetBaseException()
Try
If Not System.Diagnostics.EventLog.SourceExists(".NET Runtime") Then
System.Diagnostics.EventLog.CreateEventSource(".NET Runtime", "Application")
End If
Dim log As New System.Diagnostics.EventLog()
log.Source = ".NET Runtime"
log.WriteEntry([String].Format(vbCr & vbLf & vbCr & vbLf & "Application Error" & vbCr & vbLf & vbCr & vbLf + "MESSAGE: {0}" &
vbCr & vbLf + "SOURCE: {1}" & vbCr & vbLf + "FORM: {2}" & vbCr & vbLf + "QUERYSTRING: {3}" &
vbCr & vbLf + "TARGETSITE: {4}" & vbCr & vbLf + "STACKTRACE: {5}" & vbCr
& vbLf, ex.Message, ex.Source, Request.Form.ToString(), Request.QueryString.ToString(), ex.TargetSite, _
ex.StackTrace), System.Diagnostics.EventLogEntryType.[Error])
Server.ClearError()
Catch
Server.ClearError()
End Try
Server.ClearError()
Response.Redirect(String.Format("Error.aspx?aspxerrorpath={0}", Request.Url.PathAndQuery))
End Sub
What I end up seeing is the master page and the URL shows / Error.aspx, but the error page is not shown with it.
|
|
|
|
|
It seems that everything is fine but the address of Error.aspx is wrong as you say 'master page and the URL shows / Error.aspx'. I guess you must work on the last line:
Response.Redirect(String.Format("Error.aspx?aspxerrorpath={0}", Request.Url.PathAndQuery))
maybe you must replace it with "~/Error.aspx..."
|
|
|
|
|
How to do impersonation programatically in vb.net to access Windows Task scheduler's job status?
|
|
|
|
|
How to post in the correct forum.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Can't do it in asp.net, because asp.net for web applications will not let you access the windows operating system, as a level of protection.
You would have to write a dll for windows, and call the dll using asp.net.
|
|
|
|
|
I created ASP.NET webservice in VS2010 with 2 simple methods: I can test it locally(IP= 192.168.1.104) with http://localhost:4070/Service1.asmx, The localhost = 127.0.0.1 and not the local IP.
I go to my other machine on my network, I type in
192.168.1.104:4070/Service1.asmx to try to get at the webservice, and I get the error could not connect to '192.168.1.104:4070'. Am I doing this wrong? How do I get At my Localhost's webservice?
Thanks for your help, I am stuck with this!
modified 3-Apr-12 23:18pm.
|
|
|
|
|
The "web service" must be configured to allow connections from different computers. Also check the firewall.
|
|
|
|
|
Firewall is okay, do yuo have an idea how to configure the webservice part?
|
|
|
|
|
That depends on how the service is hosted - IIS or the "web server" of Visual Studio.
|
|
|
|
|
- I originally wanted to host it on VS, I didn't know how to do it. So, I skipped.
- I tried to host it on IIS7, I get it partially working. It lists the methods on the remote PC, but doesn't do anything, it says you can test methods only locally.
So, if my "Testwebservice" has a
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}
localhost/Testwebservice will allow me to test this function and prints "Hello World" to webpage.
On remote PC, I can get to the webservice page that lists the webmethods, but can't test it. What I really need is to be able to read the contents/results of the webservice ie. "Hello World!" from any app on remote PC. How do I do that when I can get the page to display on remotePC?
Thanks again
modified 4-Apr-12 14:52pm.
|
|
|
|
|
How do you find the services on the Remote machine? Do You use add web reference in VS and then find services by a full address including IP and service name? Let me know about your method.
|
|
|
|
|
The webdev is restricted to the local computer only, you have to setup your default web site using IIS on the local computer to allow access to the entire subnet the computer is on. So if your computer is on 192.168.1, then computers on 192.168.1 can access the page.
|
|
|
|