asp.net

XmlTextReader for json?

Is there something that is similar to XmlTextReader in terms of performance, but using JSON instead? I have the choice between parsing data in XML or parsing the same data in JSON. I'd like to use JSON because I figure I could save a bit of bandwidth but I'd like to keep the performance of XmlTextReader. In other words, how do I stream...

conditional rendering of <ajaxToolkit:ToolkitScriptManager> possible?

My site master page contains a single <ajaxToolkit:ToolkitScriptManager> declaration so that the few pages in my site that use an UpdatePanel need not include such a declaration. The downside to this approach is that a bunch of useless MS-Ajax JS is being emitted to the client even when it's not being used. Is there a way to interrogat...

Difference Between <%: and <%=

Possible Duplicate: ASP.NET special tags I hope this isn't too much of a newbie question. I seem to always use the correct syntax, but I don't really understand why I'm using the <%: and <%= in ASP.NET, and I was hoping someone could clarify for me. I found this article which explains <%= and <%#, but wasn't able to find anyth...

Topics I should learn for converting this Classic-ASP code into ASP.NET? Mainly SQL Server Database Access..

Hey guys, So, I have a very simple bit of ASP on my website currently, which you can check out here: http://www.marioplanet.com/catalog.asp Just ignore the CSS issue for now! :) Anyway, so, I have a SQL Server table in a database, and I'm pulling some information from it to make a shopping catalog of all my products. I was wondering...

ASP.NET MVC, forms auth or custom when using EF 4?

Hello, I'm new to the ASP.NET world. Since I want to use the ORM it seems I would want an Entity to represent the User or Member or whatever, not some data tucked away by the forms authentication api. In fact I don't see how I can live without one. How do people deal with this? Roll your own authentication? Or is there a best pract...

ASTreeView help! (using JavaScript with .dll's)

I love the demos of ASTreeView. I'd like to use this in my project, which is completely local and currently only uses HTML, JavaScript, and CSS - i.e. no ASP.net or anything dealing with servers... Is it possible for me to use this? There is a .dll and a .js included in the package, but I have no clue where to start since this isn't a A...

can a forms action url contain querystring values?

can a forms action url contain querystring values? ...

Writing data to a Label

I want to populate an html label based on user information. I know how to read the data from html to c#, and how to manipulate the data. I just dont know how to return the data from c# to the html label. <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="LoginUserName">Username:</asp:Label> <asp:TextBox ID="LoginUserName...

streaming PDF data through an ASPX page

How I can stream a pdf file on my web server and show it like google document inside my own page which embed inside the page. ...

Disable ASP.NET 1.1 Validator using JavaScript - Not Working in Firefox

The following attempt works in IE8 but not in Firefox (cannot use JQuery for this): case 'Template:templateControl:residenceRBL2': if (selected.value == 'Within USA') { /* Enable zip textbox and validator */ document.getElementById("Template_templateControl_zipTxt1").disabled=false; ValidatorEnable(document.getElemen...

jquery set class for a children of particular type

I have callout label associated with multiple controls, which should turn red when either of it is wrong. <tr> <th> <asp:Label for="test">jquery will make my class as updnValidationErrorLabel</asp:Label> </th> <td > this text is right <asp:TextBox class='textboxWide taskListCheckPreVital' /> </td> <td...

Overload ASP.NET MVC Actions

How can I overload actions in ASP.NET MVC, but with support for GET QueryString? I tried to do something like this: public JsonResult Find(string q) { ... } public JsonResult Find(string q, bool isBlaBla) { ... } But whenever I access /controller/find?q=abc or /controller/find?q=abc&isBlaBla=false it throws anSystem.Reflectio...

ASP.net Membership Email Verification Role

I'm learning how to use the Sql Membership provider that ships with ASP.net 4.0. I'm trying to establish three distinct roles; admin, verified and user. Account creation for the user role requires just a username and password. Then for a verified user, I also want to collect an email address and require confirmation through a link. ...

RaiseError did not raise the error enough !?

Why the error does not appear at the UI layer? I am using ExecuteScaler BEGIN CATCH PRINT N'The transaction is in an uncommittable state. Rolling back transaction.' ROLLBACK TRANSACTION; DECLARE @ErrorMessage NVARCHAR(4000); DECLARE @ErrorSeverity INT; DECLARE @ErrorState INT; SELECT @ErrorMessage = ERROR_MESSAGE(), ...

Does this book suit my needs for ASP.NET?

I was wondering about this book from Apress over at Amazon, and I'm looking for some insight about whether or not it's a smart purchase.. I think it really fits my needs perfectly, because I'm looking to implement ASP.NET to run my E-Commerce shopping website, therefore, I believe it's a great fit. I would love to learn the ASP.NET as ...

Subqueries are not allowed in this context. Only scalar expressions are allowed.

When I'm running this query on my page, I'm getting a Subqueries are not allowed in this context. Only scalar expressions are allowed error. What am I doing wrong? insert into Konular(KonuAd, AltKategoriID, KategoriID, KonuSahibi,GönderenID, İçerik,KonuTarih,SonMesajTarihi) values(@Başlık,'184','0',@KonuSahibi,'27',@İçerik,'0...

validating fb cookie using md5 hash

Hello, I am trying to incorporate facebook login in my ASP.NET web app and came across the following article which has a code sample for the same. http://ntotten.com/2010/04/new-facebook-connect-in-csharp/ The following is from the article. Next, and most importantly, the class validates the cookie. This validation uses MD5 h...

Menu in ASP.Net

Program Language: ASP.NET with C# I want to add a menu with three or more level navigation. I donot want to use the traditional asp.net menu Can I use accordian menu with three level access. What are the other option i can use. But my menu should retrived from my database.... \ & My table structer is like categoryId categoryNa...

convert javascript time to asp.net DateTime.Now

I'm trying to convert the javascript date to ASP.NET's DateTime.Now var todaysDate = new Date(); document.getElementById('hdnDate').value = todaysDate.toString(); private void ConvertToDotNetDateTime() { DateTime myDate = (DateTime)hdnDate.Value; ??? ? //bit lost here } ...

Question about using vBulletin with an ASP.NET based website

How to integrate the vBulletin forums users with an existing ASP.NET site that has its own users and login, and to maintain the session between the two sites, so when a user logs in, he/she stays logged in when browsing the forum? ...