Is there any way to write a VS Add-In or something else that would allow me to be able to link files to an ASPX page in ASP.NET.
My goal is to be able to have this extra file created with every ASPX page, and then use a custom MS Build Task to analyze those files and do some stuff.
So for example, when I created "MyPage.aspx", I'd actually see…
I created a marker interface:
public interface ISupportAJAXPostsBacks{}
I added it to my Page..
public partial class MyWebForm : PageBase, ISupportAJAXPostsBacks
I have this check in my PageBase class...
if(this is ISupportAJAXPostsBacks)
{
... do some stuff ...
}
If I step through via the debugger, "this is ISupportAJAXPostsBacks"…
I want to be able to package my JavaScript code into a 'namespace' to prevent name clashes with other libraries. Since the declaration of a namespace should be a simple piece of code I don't want to depend on any external libraries to provide me with this functionality. I've found various pieces of advice on how to do this simply but none seem…
I started the source from this progressbar example, and it works fine. My only change was to set the width of the progressbar to "20%".
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script…
I have a C++/CLI application in Visual Studio 2008 whose namespace follows the .NET guideline of CompanyName.TechnologyName[.Feature][.Design]. The problem is that there seems to be no way to set a multi-level namespace in the project's Root Namespace property. I have tried both CompanyName.TechnologyName and…
One of the pitfalls I run into on a daily basis is customers saying one thing while meaning another. Usually, this is just due to a miscommunication somewhere, but occasionally they are, in fact, saying the same thing I am just using a different term.
For example, one of my customers the other day mentioned a…
I'm doing a simple shopping cart for a small site.
I plan to store cart items as well as logged in user_id in session variables.
to make things a little more secure, I thought I'd do this:
sha1() the user_id before storing it in the session.
Also sha1() and store the http_user_agent var with some salt,…
Hi
I’m trying to resolve a problem using VB and I need some assistance. I’m very new to the language (1 week). The problem is I have created a user form to show how many hours and minutes has elapsed between two different times similar to a time sheet.
The user form consists of two calendars, and under…
I'd like to be able to run a line of PHP code on the command line similar to how the following options work:
:~> perl -e "print 'hi';"
:~> python -c "print 'hi'"
:~> ruby -e "puts 'hi'"
I'd like to be able to do:
:~> php "echo 'hi';"
I've read that there is a -r option that can do what I…
I want to modify the "Java class" template, so that the class javadoc comment includes more than just the author. In Netbeans 6.8., I go to Tools Templates Java Java Class, and modify the template. However, nothing seems to change. I tried restarting Netbeans, just in case, but the old template is…
I have been using this script to send emails to certain staff but because of changes to my system i have to now send attachements with the email and i have tried multipul peices of code to accomplish this but have been unsuccessful... I still recive the email but without the attachement which is…
Thanks for looking.
I am new to Node.js and trying to figure out how to request an object from a separate file (rather than just requesting a function) but everything I try--exports,module-exports,etc--is failing.
So, for example, if I have foo.js:
var methods = {
Foobar:{
…
Suppose I have a bunch of fruit:
class Fruit { ... };
class Apple : public Fruit { ... };
class Orange: public Fruit { ... };
And some polymorphic functions that operate on said fruit:
void Eat(Fruit* f, Pesticide* p) { }
void Eat(Apple* f, Pesticide* p) { ingest(f,p); }
void Eat(Orange*…
We have many instances in our application where we would like to be able to access things like the currently logged in user id in our business domain and data access layer. On log we push this information to the session, so all of our front end code has access to it fairly easily of course. …
I am using System.Linq.Dynamic to do custom where clauses from an ajax call in .Net MVC 1.0.
It works fine for strings, int etc but not for DateTime, I get the exception cannot compare String to DateTime. The very simple test code is
items = items.Where(string.Format(@" {0} {1}{2}{1} ",…
I have a web application running on LAMP with a testing server and a production server. Is there a standard practice for keeping the data on the testing server in sync with the production server? The data on the testing server gets out of date pretty quick and I feel like there must be an…
Hi i have a social networking website.
what i want it to do is pull out my friends status updates.
basically what it does is i have a mysql query that pulls out all of my friends and in that while loop there is another mysql query that pulls out the status's from my friends.
i want it…
I have some code which keeps track of the number of times a button has been clicked. As a matter of fact, when the page first loads, a counter is set to 0. On every postback, the counter is incremented by 1. I have only one button on the page.
The main idea behind this is to allow…
I'm attempting to write an ASCII null character (nul) to a file from a Windows batch script without success. I initially tried using echo like this:
echo <Alt+2+5+6>
which seems like it should work (typing <Alt+2+5+6> in the command window does write a null character -…
I have a git repo which has a few branches - there's the master branch, which is our stable working version, and then there is a development/staging branch which we're doing new work in.
Unfortunately it would appear that without thinking I was a bit overzealous with rebasing and…
I'm writing C++ code to run in a freestanding environment (basically an ARM board). It's been going well except I've run into a stumbling block - global static constructors.
To my understanding the .ctors section contains a list of addresses to each static constructor, and my…
Hello. I am making a 2D game with OpenGL. I would like to speed up my texture drawing by using VBOs.
Currently I am using the immediate mode. I am generating my own coordinates when I rotate and scale a texture. I also have the functionality of rounding the corners of a…
Here is the textbook standard way of describing a 'class' or constructor function in JavaScript, straight from the Definitive Guide to JavaScript:
function Rectangle(w,h) {
this.width = w;
this.height = h;
}
Rectangle.prototype.area = function() {
return…
I have two Ext.menu.CheckItem's in a group. How would I change the checked item's disc icon to something else? I would like to retain the radio button functionality (only one selected), but have a check mark instead of the disc.
var options = new Ext.Button({
…