|
coldice111 wrote: I cant understand that why its not finding the classes. All classes are in App_Code folder.
All your code behind and classes get compiled as a dll which goes into the bin folder. Efectively your wwwroot\SampleApp folder would contain a SampleApp.aspx and a bin folder containing SampleApp.dll.
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
Experience is like a comb that life gives you when you are bald - Navjot Singh Sidhu
|
|
|
|
|
Hi thanks for your reply,
I tried that too, but its then saying that dll file not found.
|
|
|
|
|
In the Build menu you will find Publish Web Site. Use that to create the files that you can use to publish the web site on the server.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
hi,
how to get the screen resolution in .net 1.1 in a web application
thanks
|
|
|
|
|
function ScreenGoToURL(Big,Medium) {
var screen_height = screen.height;
var screen_width = screen.width;
var buffer = (document.all || document.layers ||documentGetElementByID) ? 30 : 48;
if (screen_height >= 768) {
screen_width = 1024;
screen_height = 768;
var window_width = 1024-12;
var window_height = 768-buffer;
var window_top = 0;
var window_left = 0;
window.open(Big,'','resizable=no,status=yes,width= ' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + '');
} else {
screen_width = 800;
screen_height = 600;
var window_width = 800-12;
var window_height = 600-buffer;
var window_top = 0;
var window_left = 0;
window.open(Medium,'','resizable=no,status=yes,wid th=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + '');
}
}
|
|
|
|
|
hello pals
i have "windows 2000 advanced server" installed on my PC.
when i m opening IIS from administrative tools,It shows me
"The service did not respond to the start or control request in a timely fashion".
When i go in services i found that my "IIS admin service" is not yet started and so SMTP and NNTP.Also when i m trying to start "IIS admin service", i got the same error.
I also examine the "application log" from the "event viewer".And found that "Session Idle Timeout over"......
how to resolve it...
plz understand my problem and give me the proper solution ASAP.
|
|
|
|
|
I have create a class called settings to store site settings that are needed in various usercontrols. In my page_load of my web page (webform1.aspx), I am setting the properties for this class. I have also created a few webusercontrols that are being added to the webform1.aspx page. However, I am not sure how to access the settings class with the set values from within the webusercontrol. The webpage and usercontrols do not share a common base class.
|
|
|
|
|
To clarify...
I want to create a class that will hold setting values and I want this to be accessible/common with the webform and the usercontrol. The values would be set in the webform, and when the usercontrol is added to the webform, it will retrieve the values needed from the common settings class.
|
|
|
|
|
Dear all,
i am quite new to dotnet. I am making web application using C# and asp.net(Visual studio 2005).
Currently i making customer master where based Customer code that is whether it is available then populate otherwise insert.
I do not have problem in inserting new customer details. I wrote code in txtcustcode_changed event(As i am populating new customer code in page_load ) that check whether code exist or not.but in text changed event. text id which it fetches is not the changed text code. How i can make such thing. please guide me.
any better approach,would also be appreciated. please suggest me
regards
imran khan
|
|
|
|
|
Hi!
I m facing a problem using asp.net with oracle8i.
I have Oracle8i and asp.net1.1 framework on a same server. Though the Connection is getting established.
But its showing "TNS PACKET WRITER FALIURE" when fetching data..
However it worked when i separated the database server from the application server..
If any one has the solution. so that i may use same server for both database and application
Thanks in advance..
Pranav
|
|
|
|
|
I am using content and master pages. The content page has to query the database to get the master page name (among other things), which is done in ‘Page_PreInit’, and then the master page has to query the database to get some layout options, done in ‘Page_Load’.
Is it possible for the master page to use the existing open connection, or am I forced to close the connection in the content page and open up a new connection in the master page? I’ve tried various things without success.
The second question is, does it matter? Will opening and closing two connections be much slower than opening and closing one?
|
|
|
|
|
BigPaul wrote: Is it possible for the master page to use the existing open connection, or am I forced to close the connection in the content page and open up a new connection in the master page? I’ve tried various things without success.
You are not forced into any particular way of doing things. However, the prefered method is aquire-execute-release (in other words, open a connection, execute the SQL then close the connection).
|
|
|
|
|
Thanks for the reply.
My question is really concerning whether it is possible for the master page to access the connection already opened by the content page. So far I haven’t found a way to do this.
|
|
|
|
|
Yes, it is possible, just as it is possible to drop bowling balls on your feet to get out of ballroom dancing with your girl friend. Hardly the best way of doing it. Just as Colin said, aquire-execute-release.
only two letters away from being an asset
|
|
|
|
|
It's possible to use the same connection, if you have a method in the master page where you do the database work, which you call from the contents page. However, as you open the connection before the master page is even loaded, you would have to keep the connection open from one event to another, which would make it much harder to ensure that the connection is always closed correctly.
It's hard to tell if opening another connection will be slower or not, but it's safe to say that the difference is not that big. As long as you use an identical connection string the connections are pooled, which means that they are never really closed between the times they are used. So if you keep the connection alive or let the pool do it shouldn't matter much when it comes to speed. As it's much safer to leave it to the pool, you should do that.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
I figured the easiest way to do it would be to open the connection in the content page PreInit and close it in the content page Unload. This way the connection is open when the master page Load event fires, which is when it should be used. But, I can’t find a way to access the open connection.
I’m not sure how to access a master page function from the contents page, bearing in mind that the master page is defined at runtime.
|
|
|
|
|
BigPaul wrote: I’m not sure how to access a master page function from the contents page, bearing in mind that the master page is defined at runtime
You can access the master page from the content page by using the content page's Master property. However, the best solution is to aquire-execute-release in the master and aquire-execute-release in the content page. Actually, a better solution would be to move all the data access out of the presentation layer altogether.
Daniel Fisher (I think) at the DDD4 conference I was at earlier this month gave some pretty sage advice: If you are using anything in the System.Data namespace in your code behind classes (e.g. The code behind for Master pages or Content pages) then there is something wrong with your design.
|
|
|
|
|
I was under the impression (clearly the wrong impression) that opening and closing a connection twice would be slower than doing it once, and that opening a connection in one event and closing it in another immediately-following event would not be a problem – i.e. this it was essentially an ‘acquire-execute-release’ approach.
However, having since read up on connection pooling, it is obviously not necessary to try and keep the connection open.
Colin Angus Mackay wrote: Daniel Fisher (I think) at the DDD4 conference I was at earlier this month gave some pretty sage advice: If you are using anything in the System.Data namespace in your code behind classes (e.g. The code behind for Master pages or Content pages) then there is something wrong with your design.
Is there a disadvantage to accessing a database from the code-behind class? The data access for my master pages is handled in a separate class, but the content page accesses the database directly. I’m interested to know if there is a more efficient approach.
|
|
|
|
|
BigPaul wrote: Is there a disadvantage to accessing a database from the code-behind class?
Yes. It reduces maintainability of the appliction.
BigPaul wrote: I’m interested to know if there is a more efficient approach.
Efficiency (or performance, what ever you want to call it) is usually not one of my top priorities when writing software. Maintainability and Readability come first unless performance considerations are an explicit part of the specification.
I will always go for readability or maintainability even if it costs me a few extra clock cycles because nothing is worse than having to debug code written using the "Giant Ball of Mud" pattern.
If you separate out the database access into its own class (or classes) you get improved readability because your code behind is not cluttered with calls to open connections, set up queries, execute queries and close everything down again - You let the DAL (Data Abstraction Layer - the class[es] that you write) handle that.
You get improved maintainability because all your data access code in in one place (the DAL). This means that if you have to make any substantial changes to the database you don't have to go looking over an entire code base.
You can even get improved efficiency with a DAL if you work it right. For example, you would normally get a connection string out of the config file. The DAL can do that once then cache it. The DAL is always using the cached connection string so that connection pooling works better (there is no accidental use of a slightly different connection string to get to the same thing - which creates a new pool).
|
|
|
|
|
BigPaul wrote: and that opening a connection in one event and closing it in another immediately-following event would not be a problem
It is a problem if the second event never is executed. If you encounter an error somewhere in your code between opening and closing the connection, the event that closes the connection will never be executed and the connection will be left open.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Hi
I am working on asp.net and i want to write a program in asp.net i.e to get the date and time of different countries on selecting the countries name.So can any one help me out?
Thanks...
Deepti
|
|
|
|
|
deeptis wrote: I am working on asp.net and i want to write a program in asp.net i.e to get the date and time of different countries on selecting the countries name.So can any one help me out?
I'm sure there are many people. What part are you stuck with?
|
|
|
|
|
Hi all , I'm studying a case study from Microsoft about CommonWealth Bank using SOA.
Any way ..during studying I'm facing some problems in imagination for implementing some features..
1)how to add specific pieces of information or data to the response and request in order to be passed from one module for example to another or from the server to client and vice versa?
2)how can I get access to the that response of the WebSerice ?-can just call method from proxy class-
3)what is Soap Handlers ? Have not heared about it before!!!
4)Attributes have the ability to generate code for method at run time or maybe link this method to the implementation at run time ?
5)Any idea about what is LDAP and AZMAN and how to use them in authorization with active directory ?
that is what have been saied and what i'm trying to understand .. I really appreciate your help or linking me to helpful resources
My Regards
Davids Maguire
|
|
|
|
|
how can i put the datalist up in the top of a table because its coming in the middle of the table row. all i have is just 1 record into a datalist and it is coming with alot of space inside the table and the datalist in the middle of that space. why is this?
Thanks
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
I guess you only need to change the valign property in the the table row to top and it will be displayed properly.
Mohamed El Gohary
|
|
|
|