As the title states, I have a session variable that is set during a login script with asp.net and vb.net code-behind. Can I call a javascript function when a link is clicked that will destroy that session variable?
If it is possible, can I use jQuery to make that process easier?
...
I am refactoring a page that uses <body onload="myJS();"> to a user control. I understand I can do it using server side script registration on load.
If I want to do it on the client side (ascx), how would I do this?
...
What best practice or strategy would you use to enable bulk insert/update in an asp.net gridview control with paging enabled?
Say for e.g. you have about 10000 records and this data gets populated when the page loads and this happens in chunks of say 100 records per webservice request.
To enable editing on these rows what approach woul...
What do I send as the owner for a MailDefinition.CreateMailMessage() sent through an ASP.Net MVC Controller?
// owner:
// The System.Web.UI.Control that owns this System.Web.UI.WebControls.MailDefinition.
public MailMessage CreateMailMessage(string recipients, IDictionary replacements, Control owner);
Edit: sending a new System...
Let me start by saying, I'm no expert in windows file permissions, so maybe there is something very basic I am missing here.
I have a Asp.net FileUploader control. I have a folder on the same machine as the Asp.net application I would like files to be uploaded to.
I want to be able to tell the FileUploader to put the files in
\\this...
I'm working on a mobile site where we can't rely on the phone hitting the site to have cookie support. I'm using the cookieless option for sessions and wondering if there's a way to specify where in the URL that the sessionId gets placed?
Here's what it looks like now:
http://www.somesite.com/(S(qnxbzt45h2yxpr45tj3hpr45))/Default.aspx...
Background
In our last adventure, I was attempting to properly show a Dictionary<Foo, Bar<T>>. Thanks to the helpful answers in that post, I realize I had been going about it in the wrong way.
Problem
In today's adventure, I've been trying to get two specific properties from the List<T> in the last question to display. Each List h...
I've read that in PHP non-persistent open links are automatically closed at the end of the script's execution. So what's up with asp.net?
...
I haven't been able to find much about this but am I the only one that noticed if you enabled tracing output in an ASP.NET MVC project it outputs the whole trace output once per every MVC user control?
...
Hi, can someone tell me how I can use the CreateUser method in the Membership class without having to assign a question and answer?
I have disabled it in the web config: requiresQuestionAndAnswer="false"
I need the status output from the CreateUser method but the overload requires a question and answer, can anyone suggest how I can g...
I recently inherited a project that was done with the "web site project template" (which I hate by the way). I have always worked with the "web application template" which I love. I'm perplexed by something that I found in the project though. There is custom control instances throughout all the pages like this:
<cc1:MarketingItem runat=...
Just a year or two ago I thought that learning WPF is the best use of my free time. Now though, I'm not so sure: seems like the number of ASP.NET jobs vs. WinForms/WPF is something like 10:1. Am I the only one noticing this, or is this really an overall trend? And should all thick-client developers drop everything and begin learning ASP....
I have used ExpressionBuilders here and there within my asp.net markup to return simple data types.
Does anyone have any ideas how an ExpressionBuilder might be used to wire up an event inline? Or can ExpressionBuilders only return literals?
I would like to wire up the OnLoad event (or any event) by creating an ExpressionBuilder (named...
I've got a person object with a name and age property that implements INotifyPropertyChanged. I want to hook this object up to an ASP.NET form so that the 'name' and 'age' properties bind to textboxes in a way that, when changes happen in either place (in the control or in the object) the other will get updated.
Do I create an intermedi...
Got this error when trying to load an aspx page:
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[PolicyException: Required permissions cannot be acqu...
Code:
Public Sub UpdateDB()
Dim db As New linqclassesDataContext
Dim article = From p In db.articles _
Where p.id = articlelist.SelectedValue _
Select p
article.FirstOrDefault.body = FCKeditor1.Value
Try
db.SubmitChanges()
Catch ex As ChangeConflictException
fcke_output.Text = ex.Message
End Try
End Sub
no e...
hi
1)
a) Why is it preferable to bypass DataSet when updating, deleting or inserting records ( I realize using DataSet takes more CPU time and memory, but are there any other reasons besides that?! )?
b) Are direct updates faster than batch updates? Why?
c) Why do Web services represent only real web application scenario in which ...
hi
1) I noticed that after you close SqlConnection instance, you are still able to re-open the same connection:
a) can you tell me what is going on behind the scenes? Meaning, after we close file stream object, we can’t re-open it, but instead must create a new object – so why isn’t the same with SqlConnection objects?
b) If pooling ...
What is the correct way to get a control that was rendered by ASP.NET with jQuery?
Example: I have a checkbox that was generated like this:
<input id="ctl00_Content_chkOk" type="checkbox" name="ctl00$Content$chkOk" />
If I want to select it to get if it's checked, I tried this:
$('form input[name=chkOk]').attr("checked")
and
$('c...
I have gridview that I am using paging on. I want to pass along the current page in a asp:Hyperlink so I can send them back to the current page when they are done viewing the details of a record. Is this possible? If it is how can I do this?
<asp:GridView ID="grdObitList" runat="server" allowpaging="true"
PageSize="10" Aut...