Hi, I have a web app in asp.net 1.1 . I've created resource files (.resx), and need to add images to it that can then be displayed using the html img tag. How do I load images into .resx files? Should I be loading the image or a path to an image? Also, I'd like to place all resource files in a sub-directory in the root, and then have them be compiled and placed in a dll in the bin dir. How do I do this? As of now, the only option I see is that I place all the .resx files in the root, and VS will compile them, and place them in a dll in the bin folder. I'd like to see the many .resx files in a dir of their own. How do I do this, and have the vs compiler find them? Thanks. Shefali
shefali_sinha
Posts
-
editing .resx files -
Handling redirect errors from web servicesHi, I have an asp.net 3.5 app, and it calls an external web service and passes it a callback url. This works fine except when the webservice has an error and messes up the callback url, so that the response they should send to the callback url is sent to a faluty url as they've messed up the callback url we gave them. How should I handle this error? In 1.1, I have handled similar problems using webhandlers so that when the response comes in comes to our server with a faulty url, the webhandler redirects it to some place that makes sense. Is this still the way to handle this in asp.net 3.5. Or is there a better way? Also, I need to save the callback url somewhere so that after we get the response with the faulty url, we redirect to the correct callback url. But where should I store this? If I use a webhandler and store the callback url in the session, can the webhandler access it? Thanks. Shefali
-
Deploying with Silverlight 2.0Michael, Thanks. About going live, please see http://silverlight.net/GetStarted . Its says: "Microsoft recommends companies begin to experiment and build with the Beta to ensure applications can be deployed on subsequent releases, there is also a Go-Live license available for Silverlight 2 Beta 1 for early adopters." So, I think we're OK deploying with SL2 beta 1. Thanks. Shefali
-
Deploying with Silverlight 2.0Hi, We've developed an app that uses Silverlight (mostly plays videos). We're using VS 2008. The app runs fine when launched from VS 2008. When we publish to a website using VS 2008, and launch the page, the page does not display any SL controls. Right-clicking on the page simply display the right-click menu with 'Silverlight Configuration'. What are we missing? Do you need to install any server compnents for Silverlight? We have installed the plug-in for the browser. We'd like to go live with this end of May. Thanks. Shefali
-
SilverLight video time slider slow responseHi, We're using SL v1 to play a video streams from a Window Media server. We had no problems when we were using windows media player to play this video, but when using SL, the time slider causes a long pause, very slow rendering the video. Has anyone solved this problem? Are there any good sample implementations that someone could point me to? Thanks. Shefali
-
too many error logs filling disk spaceHi, I am working on an asp.net 2.0 application where the error logs generated are filling up the disk space. In another application, I had solved this problem in asp.net 1.1, by running a nightly schedule task that compressed these logs, and moved them to another machine, thus preventing current machine from getting full. Wondering if there is a better solution to this problem in 2.0, anything other tools out there that can provide a better way to handle this? Thanks. Shefali
-
HttpContext.Current.Request.ServerVariablesHi, We're using asp.net 2.0, c#, and writing keys from HttpContext.Current.Request.ServerVariables to a log file. We're writing all keys except ALL_HTTP*, ALL_RAW*, VSDEBUGGER*, SERVER_*, HTTPS_*, CERT_*. Very often HttpContext.Current.Request.ServerVariables seem to have no values, and nothing gets written to the log. Under which circumstances are HttpContext.Current.Request.ServerVariables null or empty? Mostly, we need info about PATH_INFO, PATH_TRANSLATED, URL. Is there another way to get these so that we always have this info? HttpContext.Current.Request.ServerVariables does not always have this info. Thanks. Shefali
-
import addresses from gmail, yahoo, hotmail, aol, etc.Dilip, Thanks for your response. Appreciate it. Do you have any idea how LinkedIn and Facebook are importing their user's address books? They have done what I've proposed doing. They've been doing this for a while now (a year or so), and have not been marked as spam. Thanks in advance. Shefali
-
import addresses from gmail, yahoo, hotmail, aol, etc.Hi, We have a website developed in asp.net 2.0, c#, sql server 2005. I need to provide users with a way to import their address books from gmail, yahoo, hotmail, and aol at the least. I searched the net, and found soooo many solutions, most providing code to be integrated with our code, some providing web sites that would do the conversion. Ideally I'd like to connect to some sort of a service where we would provide the service the user's email and password, and would get back a comma separated list of address info from their address books. The solutions on the net cost anywhere from $0-$500, and I could not find any rating as to how well the solution would work. So its hard to go with any of them, and know that they'll work well now, and continue to work in the long term, as in they'll keep adding more facilities to import from, continue to support any changes needed to current solution such as when gmail changes their address book format... Any recommendations will be appreciated. Thanks. Shefali
-
our forum has msgs > 8KThanks a lot. Haven't had a chance to look into pre-compiles regex, but will look into it. I simply converted a varchar(8000) field to varchar(max) and another ntext field to varchar(max), the latter conversion was for the sake of better perfromance of a varchar(max) vs. ntext, and my world stayed perfect. Testing reveled no problems. To do the conversion in sql server 2005, I used the statement: alter table alter column varchar(max). Just thought I should document this here in case it helps someone else. Shefali
-
our forum has msgs > 8KHi, Our website provide users with a forum where they can enter messages. So, typically, a user would enter a message, click submit, and their message would be displayed on the forum. The db that stores these msgs uses a varchar field. Now, we're adding a facility to convert any urls that are entered to links by adding 'a href' tags, so that when users see messages with urls, those urls appear as links, and they can click on them. The problem is that if a user enters a message of 8K chars, then we add 'a href' tags to any urls they have, that makes the message length > 8K, preventing us from storing it in our db. (Please note that we do need to add HTML tags for other reasons as well, not just to convert urls to links.) We thought about adding 'a href' tags during pre-render, thus avoiding storing html in the db, but found that doing such string manipulations, while a user is waiting to see their post displayed on the forum, was expensive. Timing tests revealed that the time to render such pages more than doubled. I have solved such problems previously by adding an extra field in the db to store any overflow data, that is, data that appears after the first 8K chars. However, I learnt of sql server 2005's varchar(max) datatype, and 'am wondering if the best way to solve this problem would be to replace the varchar field with varchar(max). Thanks in advance for any advice. Shefali
-
our forum has msgs > 8KHi, Our website provide users with a forum where they can enter messages. So, typically, a user would enter a message, click submit, and their message would be displayed on the forum. The db that stores these msgs uses a varchar field. Now, we're adding a facility to convert any urls that are entered to links by adding 'a href' tags, so that when users see messages with urls, those urls appear as links, and they can click on them. The problem is that if a user enters a message of 8K chars, then we add 'a href' tags to any urls they have, that makes the message length > 8K, preventing us from storing it in our db. (Please note that we do need to add HTML tags for other reasons as well, not just to convert urls to links.) We thought about adding 'a href' tags during pre-render, thus avoiding storing html in the db, but found that doing such string manipulations, while a user is waiting to see their post displayed on the forum, was expensive. Timing tests revealed that the time to render such pages more than doubled. I have solved such problems previously by adding an extra field in the db to store any overflow data, that is, data that appears after the first 8K chars. However, I learnt of sql server 2005's varchar(max) datatype, and 'am wondering if the best way to solve this problem would be to replace the varchar field with varchar(max). Thanks in advance for any advice. Shefali
-
New app is ASP, then migrate to ASP.NET 2.0Hi, One of my clients started developing a new web app in ASP.NET 2.0. After a couple of months into development, they decided it was taking too long, that the same app would take them 3-4 months to complete in ASP, and then they would migrate to ASP.NET 2.0. I am wondering if there is anything they can do now in the new ASP app that would make migration to ASP.NET easier. For instance, would it be easier if they, and can they, use VS2005 to develop the new ASP app? Can they develop the new app over ASP.NET 2.0 and have the old ASP Server classes such as Server, Request, Reponse, etc., available to them? Or rather what will they not be able to do in the classic ASP way, in VS2005 and .net 2.0, that they could do when it was just ASP? What are the big hurdles that typically come about when code is ported from ASP to ASP.NET, and could they do something now, in the new ASP code base to prevent that? Any info is appreciated. Thanks. -Shefali
-
displaying images in tooltip for tree nodesHi, I am using the treeview control to display a tree. I'd like to be able to display images and an html table in the tool tip of each node, customised to each node. I understand I could do this using Javascript to create floating elements, but 'am hoping to find an easier solution with .net. I appreciate any info provided regarding this. Thanks in advance. -Shefali
-
body onload & AtlasHi, I have a question related to the body onload event. In the absence of Atlas this event is fired everytime the page refreshes. I have code in the onload event that needs to execute everytime there is even a small change to the client. When using onload with Atlas, I find that it fires the first time the page loads, but not everytime the page refreshes. Which other event can I use to execute code everytime there is even a small change to the page? Thanks. -Shefali
-
Tooltip window -
div with display inline & span not working with text-overflow ellipsissorry, some nested html messed up my last post about this. Heres my 2nd attempt to post this. ******************************* Hi, I have text like this: text that is very very very long and this text on same line to follow ellipsis It needs to be displayed in Intenet Explorer like this: text that is ... and this text on the same line to follow ellipsis. I have tried div and span tags, all give me the same problem, either the text has a line break after ellipsis, or the text does not break, but there are no ellipsis. What I've tried: 1.
text that is very very long
and this text on the same line to follow ellipsis 2.
-
saving app size and desktop locationHi, I have an app developed using Windows Forms. I need to save the size that the user resizes the app to, so as to open the app window to that size when the user restarts the app. I also need to save the desktop location of the app, so as to display the app window at that location when the app restarts. What is the best way to do this? I have implemented this using a config file, such that I save the size.width, size.height, and location.x, location.y of the app when the event to close the app is fired. The problem with this is that when the user closes the app in its minimized state, then the app size is 160 x 30, and the app re-opens at this size at the next restart. :-) Thanks. -Shefali
-
HTTPHandler to create & write filesHi, I have several web apps on my server. One of them is based on the HTTPHandler class. This needs to create and write a file in dir 'c:\inetpub\wwwroot\httphandlers'. Its being run under the ASPNET account, which does not have write privileges for this dir. I could change the ASPNET account to be of type 'administrator', but that does not seem like a safe thing to do. Another would be to write this file to dir \temp, a dir that is used to support web services. Is it safe to do so? If not, is this a case where I should use 'Impersonation'? This file needs to persist through the lifetime of the application, and the solution needs to work for Windows XP, and Windows 2003 server. Thanks. -Shefali