Click here to Skip to main content
15,885,757 members
Everything / Web Development / ASP.NET

ASP.NET

ASP.NET

Great Reads

by Wonde Tadesse
The other option will be to use Update Panel ASP.NET control as much as possible. It helps to retain the current position on the page whenever a postback happens to the page.
by John Atten
OWIN, Katana and Middleware Pipeline in ASP.NET
by Altaf Ansari
SignalR Real-Time ChatApp with Emoji / Smiley and sending file attachment
by Steve Krile
Fully AJAX-enabled user control used to select names from a database in a drop-down format.

Latest Articles

by Rudi Breedenraedt
In this series, we will see how to build interactive web applications in ASP.NET Core with the help of Sircl.
by Mohammad Elsheimy
Configuring OpenSSL minimum version and legacy renogetiation
by Mark Pelf
A practical guide to building a multi-language ASP.NET 8 MVC application
by Mark Pelf
A practical guide to build a multi-language ASP.NET 8 MVC application

All Articles

Sort by Updated

ASP.NET 

17 Apr 2017 by #dev_Preet
i made an asp.net based web site using visual studio 2013 ,and want to run that web site in usb flash drive , is there any application which might help me regarding this problem? What I have tried: when i used tools which are developed for this job like cassini dev etc i got : Configuration...
7 Jan 2010 by #realJSOP
I suggest you find another line of work. Maybe... running the machine that puts ridges on the sides of checkers.
8 Jan 2010 by #realJSOP
The first thing I would do is evaluate the string in the debugger BEFORE it's sent to your stored procedure. At that point, you can paste it into SQL Manager Express and try the query there to see WHERE your problem is.
17 Jan 2010 by #realJSOP
You could use Linq-to-XML to parse the a tag and retrieve the href attribute. That will give you the link itself.
18 Jan 2010 by #realJSOP
You probably have to use javascript to get the size of the div (assuming it has an ID assigned to it), and then you can scale the image to fit.
18 Jan 2010 by #realJSOP
You don't have to post the same question multiple times.
20 Jan 2010 by #realJSOP
I wouldn't visit a site that I knew could scrape files off a client machine. In fact, I'm pretty sure that unless you convince the user to install an ActiveXcrement module, this is pretty much impossible to do.
21 Jan 2010 by #realJSOP
It's pretty much done with a combination of CSS and javascript. I go to this website[^] when I need some css/javascript guidance.
22 Jan 2010 by #realJSOP
You need to establish two connections - one to each server.
25 Jan 2010 by #realJSOP
I suspect you won't get a very good answer, considering you appear to want someone to actually write the site for you.
25 Jan 2010 by #realJSOP
How - there are many ways depending on what you're doing.When - when you're performing a long operation and don't want the web page to die on your users.Google "asp.net multi-threading"
25 Jan 2010 by #realJSOP
I googled it and couldn't find an answer to this. I wouldn't push on it (nested master pages) too hard though, because you'll probably find the limit at the worst possible time. :)
1 Feb 2010 by #realJSOP
Did you see this?File Upload with ASP.NET[^]
3 Feb 2010 by #realJSOP
You can't technically throw an exception from a stored proc. You candle them *in* the stored proc and return some sort of an error message back to the calling front end (through the SqlCommand.Parameters property).If you don't handle the exceptions in the stored proc itself, the framework...
4 Feb 2010 by #realJSOP
A google search found this among almost 30,000 results:http://www.soapuser.com/basics4.html[^]
5 Feb 2010 by #realJSOP
Windows comes with a remote desktop service. If you don't like that one, try VNC.
10 Feb 2010 by #realJSOP
I think this question is too broad to be answered in Quick Answers. I believe the source code to this site is generally available, but if it is (and I were you), I'd only use it as an example to solve various problems you might encounter when developing your own site.All that being said,...
15 Feb 2010 by #realJSOP
Just implement authentication on the page. If this group of users never changes (or infrequently changes) I would consider creating a group on the web server, give those users an account on the box, and put them into the group that is allowed to access the web app. That way, the we app can ask...
17 Feb 2010 by #realJSOP
Ever heard of google?Programmatically Convert Documents to PDFs the Easy Way[^]
18 Feb 2010 by #realJSOP
Deleted because it's the same question posted a 2nd time.
20 Feb 2010 by #realJSOP
Have you tried search google?http://articles.techrepublic.com.com/5100-10878_11-6016329.html[^]or maybehttp://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/[^]With just a little effort on your part, you wouldn't have had to wait for an answer.
21 Feb 2010 by #realJSOP
I don't have a tree control handy in an app, but see if there's a SelectedItem property, and if there is, set it to null.
3 Mar 2010 by #realJSOP
In IIS, you need to set permissions on the web app/virtual directory.
3 Mar 2010 by #realJSOP
Tip for lightweight asp.net web site:Don't use a lot of HTML or code-behind.
23 Jun 2010 by #realJSOP
A low-impact method for getting the appropriate path on a web page.
5 Mar 2010 by #realJSOP
Unless you have a mail server on your local box, that won't work.You probably also need some credentials (userID/password) to send/read mail on your mail server. If you don't need those things, you have no business running a mail server that's exposed to the internet.Lastly, turn off...
5 Mar 2010 by #realJSOP
This has nothing specifically to do with asp.net. It's a matter of using the framework.A simple google search revealed this method for rotating an image (using C#).#public static Image RotateImage(Image img, float rotationAngle){ //create an empty Bitmap image Bitmap bmp =...
10 Mar 2010 by #realJSOP
Try googling this: "asp.net paging in a gridview". I found 78,000 hits.
10 Mar 2010 by #realJSOP
You're going to have to ask better questions if you want help.
14 Mar 2010 by #realJSOP
Yes, you can use IIS.The answer regarding *how* to do it is a broader subject than Quick Answers is intended for.Google is your friend.
14 Mar 2010 by #realJSOP
Once again, *how* to host a web site is beyond the purpose of the Quick Answers intended use. Use Google to find out how to install and configure IIS on your operating system (Windows version) of choice. If it's really that urgent, you'll go ahead and google it. You'll get MILLIONS of...
18 Mar 2010 by #realJSOP
The page the user goes to could simply pull the email address out of the query string and perform whatever action you want, and hen present the user with the status of the action.Where exactly is your issue?
19 Mar 2010 by #realJSOP
First, I suggest that you contact the 3rd part and ask them. Second, make your page do essentially nothing, and see what happens. If it's okay, start adding back stuff until it generates the exception again.
19 Mar 2010 by #realJSOP
What gives you the idea that your question is at all answerable, given the complete lack of information you've provided?I googled that error, and of the over 10,000 hits returned, this was the third...
22 Mar 2010 by #realJSOP
Imagine... If you had googled this (like I did), you wouldn't have had to wait for an answer...The following line will tell you the last identity that was entered into the specified table.SELECT IDENT_CURRENT(‘tablename’)
24 Mar 2010 by #realJSOP
I googled "ajax tooltips" and got over 560,000 hits. I didn't investigate any of the links, but from the descriptions, they looked like they would be applicable. Chances are you're not going to find something that's a precise fit for your needs. That means that you'll have to fall back on your...
25 Mar 2010 by #realJSOP
I would be surprised to hear that Windows would allow a web site to modify the local IIS configuration (or even a remote one).
25 Mar 2010 by #realJSOP
Guess what, I found both answers with ggogle...Ramesh Reddy11111 wrote:how to restrict postback on entire page in asp.neRemove the runat="server" attribute from the controlYou can also add an onclick attribute to the control and return true...
26 Mar 2010 by #realJSOP
In your button's click handler, change the background property of the desired cell(s).
29 Mar 2010 by #realJSOP
You need an integer column in the table that is set as the primary key and auto-incrementing (an "identity" column).
1 Apr 2010 by #realJSOP
Where - exactly - in the code are you getting the error, and why aren't you just using a Validtor instead to make sure the user entered something?
1 Apr 2010 by #realJSOP
Set the edit fields to be empty manually on a page load.
4 Apr 2010 by #realJSOP
If your hosting service plan does not explicitly state that it supports ASP.Net, then it doesn't. ASP.Net support usually costs a a lot more than you'd want to pay anyway, so your best bet is to run your own server (if it doesn't violate your ISP's acceptable use policy).
6 Apr 2010 by #realJSOP
Either your path is wrong, or the image file doesn't exist where you said it does. Make sure you're using relative paths.
7 Apr 2010 by #realJSOP
Have you considered using google? That's what we would have to do to answer your question...
9 Apr 2010 by #realJSOP
Not only yes, but if you had Googled it, you would have found this as the very first hit:http://msdn.microsoft.com/en-us/magazine/cc163848.aspx[^]
14 Apr 2010 by #realJSOP
You don't have to change it to XML. Get the HtmlAgility library, and use that. You can find it on CodePlex, and I'll leave the googling to you.
14 Apr 2010 by #realJSOP
Make sure that the service class inherits from System.Web.Services.Service.Without this you don't have access to the Server object.
20 Apr 2010 by #realJSOP
If you don't show us your code, we can't help you.
24 Apr 2010 by #realJSOP
Why do you have curly braces at the end of this line :imgByte = New Byte(File.ContentLength - 1) {}
25 Apr 2010 by #realJSOP
Show us the applicable code that already have.
26 Apr 2010 by #realJSOP
I've never heard of that before. Maybe you need to reinstall Visual Studio...
28 Apr 2010 by #realJSOP
Why don't you use a class data member in the code-behind, set the value of that data member and use if in your HTML instead of setting the label's text property.In the code-behind:public class myclass{ public string mylabel = "";}In the HTML: You...
28 Apr 2010 by #realJSOP
If it really was urgent, you would have googled it.
1 May 2010 by #realJSOP
This is not an appropriate question. This is a programming site, not a "where can I host my mail server" site.
1 May 2010 by #realJSOP
Yeah, but you would have to use the WebClient object to do it. You need to request the upload page, parse the response so that the appropriate page control contains your filename, and then post it back. It's not trivial, but it's not hard either.
3 May 2010 by #realJSOP
I'm with Christian on this one. If you can't navigate the Submission Wizard, I seriously doubt you could follow even more instructions.
4 May 2010 by #realJSOP
In the interest of using correct nomenclature, the member of an enumuration is called an "ordinal". To get the ordinal value of the enumerator, simply cast it to the appropriate type (normally an int).I also wrote a tip/trick regarding the setting of enumerators from untrusted...
5 May 2010 by #realJSOP
You haven't given us enough info to answer the question accurately, but if your table has a identity column, you can simply do this :select top 1 * from table order by identitycolumn desc
6 May 2010 by #realJSOP
There are a couple of ways you can do this, but the easiest is to do this:your existing content goes here
9 May 2010 by #realJSOP
By considering your audience, the tools you have on hand, and your willingness to buy the necessary libraries and toolkits when you realize that you have the design skills of a two-slice toaster.Using Silverlight doesn't guarantee anything. How hard do you want to work at it?I suppose...
12 May 2010 by #realJSOP
You're going to have to write one routine in Java, and then one routine in .Net. As long as you use the same encryption algorithm with the same vectors and keys, the result should be the same. The same holds true for decryption.
14 May 2010 by #realJSOP
When the user clicks the button to submit, have the 2nd page redirect to the first, and load the text from the session var into the text field.
15 May 2010 by #realJSOP
I googled "C# ajax using an updatepanel", and this was the first of 143000 hits:http://msdn.microsoft.com/en-us/library/bb399001.aspx[^]
16 May 2010 by #realJSOP
What part of that didn't you understand? It's telling you *exactly* what is required.0) The web server account needs read/write access to the Applications folder if the App_Data folder doesn't already exist. Solution - create the App_Data folder in your project BEFORE you deploy it.1)...
17 May 2010 by #realJSOP
Your object has to be derived from ISerializable in order for it to be passed to/from a web service.Google is your friend.If you decide that you want to pass parameters, I wrote a tip/trick that shows how to pass any number of params of any type to a web service method.Pass Dynamic...
17 May 2010 by #realJSOP
Well then, the obvious answer is that you're doing something wrong in the web page. Are your parameters (if any) correct? Are you calling the correct stored procedure? How are you calling the stored proc from the web page? What exception is being returned?Your question is so vague that we...
17 May 2010 by #realJSOP
http://url.com...
18 May 2010 by #realJSOP
As far as I know, you can't instantiate/return a class from a web service. A web service exposes methods, not classes.
19 May 2010 by #realJSOP
Put a try/catch block around it and ru it under the debugger to see exactly what the error is. At that point, you should be able to figure it out.
20 May 2010 by #realJSOP
I'm with Christian on this one - if you don't know these concepts, how can you possibly get a job as a programmer?Maybe you should consider a career change - like making peanut butter and jelly sandwiches for the homeless.
20 May 2010 by #realJSOP
So you want to randomize and array. Did you consider using the Random object? (Actually, there's a better random method but it's kind of limited (only returns 0 to 255), but at least it's built into the framework. In any case, the general approach you want to take is to 0) get a random...
20 May 2010 by #realJSOP
I'm pretty sure you can't use ref as a parameter modifier. Instead of doing th parameter list from hell, create a XML string and pass just one parameter, and return a xml string with the results.Believe me - it's much simpler and easier to maintain.
21 May 2010 by #realJSOP
If you google it, you get over 15 MILLION hits, and this is one of the first ones:http://msdn.microsoft.com/en-us/library/z36h8be9(VS.80).aspx[^]
21 May 2010 by #realJSOP
I wrote a tip trick about it:Pass Dynamic List of Parameters to Web Service[^]That should get you started.
21 May 2010 by #realJSOP
This has been asked and answered so many times here, that the site should be reurposed into providing JUST that information. Try doing a search on the site, or maybe (GAK!) using google.
23 May 2010 by #realJSOP
First, why mark it as internal? The code can only be accessed by the site that contains it anyway. Further is the class marked as public?
24 May 2010 by #realJSOP
I googled the phrase "c# network time protocol" (you can too), and found this code:http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#GawBxmf1je8/NTP/NtpClient.cs&q=ntp%20lang:c%23&l=34[^]
26 May 2010 by #realJSOP
We can't help you if you don't tell us more than "it's not working".WHAT isn't working? Did you try running the code under the debugger?
27 May 2010 by #realJSOP
It's not possible - and shouldn't be because it has serious security implications.
28 May 2010 by #realJSOP
Your request is much to broad to be asked in a section of the web site called "Quick" Answers.You need to write your program and when you encounter a problem, ask about that problem here.Alternatively, you could hire someone to write the code for you.
30 May 2010 by #realJSOP
Your question doesn't mention it, so I'll assume that you're using SQL Server.I googled the phrase "t-sql store/retrieve image", and the first link in the list of 154000 hits was this one.http://www.beansoftware.com/asp.net-tutorials/images-database.aspx[^]If that doesn't give you...
1 Jun 2010 by #realJSOP
To be a programmer, sometimes you have to be able to "do it yourself". The way you've posed your question, nobody here is going to be willing to help you. I don't think it's unreasonable to show that you've put some effort into the problem yourself (it is, after all, *your* problem).
1 Jun 2010 by #realJSOP
Heres the query:string query = string.Format("SELECT id from table where id = {0}", myID);
2 Jun 2010 by #realJSOP
Look at Log4Net. It does all that stuff.
2 Jun 2010 by #realJSOP
Did you google "create charts with javascript"? When I did, I got over 4.6 MILLION hits.
6 Jun 2010 by #realJSOP
No code = no answer. BTW, don't post the entire project either, just the relevant code snippets.
6 Jun 2010 by #realJSOP
Without seeing one of your stored links, it's impossible to say what's wrong, but...There are several ways to resolve a path on a ASP.Net web page. Check out this tip/trick - it might help:Resolving Paths in a Multi-Folder WebSite[^]
7 Jun 2010 by #realJSOP
They're initialized with the "=" sign. How they're initialized depends on what type they are. Intrinsic types can simply be assigned a value. Complex types must be instantiated with new before they can be used. Beyond that, you should read a book because learning to program at this level is...
7 Jun 2010 by #realJSOP
Your best bet is to maintain some sort of progress file (I would probably use a XML file).When the job is about to start, put the job identifying info into the file, and when the job is successfully completed, remove the info. If the job fails, you can restart it based on the info in the file.
7 Jun 2010 by #realJSOP
Backup the database before running the maintenance task. If the maintenance task succeeds, do nothing. If it doesn't succeed, restore the database from the backup, and run the process again.BTW, I'm not a DBA, but can't SqlServer do this internally?
10 Jun 2010 by #realJSOP
Try putting a div in the cell like this: ...your content here No guarantees, but it's something to try.BTW, nesting tables like that is bad mojo. You shoud try to do at least one of the tables using CSS...
11 Jun 2010 by #realJSOP
It depends on how you're uploading it. If it's via windows sockets or the query string, you have to write code that will open the file in such a was as to overwrite the file if it already exists.If you're doing it via FTP, (I think) you have to delete the file on the remote machine...
11 Jun 2010 by #realJSOP
It's pretty obvious what the problem is - you simply have to read the error message. It's telling you that....Oh look! Something shiney!
11 Jun 2010 by #realJSOP
I seem to remember trying to find the same info on this, and like you, found nothing. I don't think it can be done. You're going to have to come up with your own control if you want to make it configurable.
16 Jun 2010 by #realJSOP
Your parameters have to be escaped.Instead of having the pointy brackets, you have to use "" in your string.
17 Jun 2010 by #realJSOP
You have more control over what's happening with method #2. That's the one I would choose. However, don't forget to add the requisite try/catch/finally block to handle any exceptions that might occur.
17 Jun 2010 by #realJSOP
You're not going to be able to conduct a meaningful search if you don't require a certain pattern for the search criteria.I would require the user to type something like "first=john;last=simmons" in order to find someone named "john simmons".You could extend this to be "first=john" +...
27 Jun 2010 by #realJSOP
The only way you're going to learn which one is "better" is by evaluating your requirements, and comparing them with what both approaches bring to the table.