Watermarking Code Works But Not If Used In Codebehind File?
Nov 1, 2009
Puzzled why the same Sub Page_Load code will not work if used on the codebehind file. Current code works fine if used directly on the aspx page,but as soon as i try placing the same code in a codebehind file the images will not show at all. Will post code sample if requested.. The way the code is setup thumbnail page opens a new page that displays larger image with watermark. the watermark page only contains code that creates the watermark for the larger image page.
I am having trouble accessing a Javascript function from my code behind file. I need to do this as I am using the GoogleMaps JS API to add markers to a map based on addresses retrieved from my database. I have a function called AddMarker that takes in the address as a parameter, so I need to be able to call that from my code behind file in the page_load function.To simplify the question, how I can I call this javascript function to display an alert with a string passed from my code behind file?:
I am have been trying to teach myself ASP.NET and Javascript for a project and have been stuck on one problem for literally dozens of hours now. I found a really nice javascript drag-and-drop list online, copied the source offered and split the css into a .css file, the javascript into a .js file and the HTML and reference into my asp.net page. It worked perfectly. Next, I replaced the javascript list with a static HTML list populated with the same data, wrapped it in an UpdatePanel and set up an "edit order" button to swap the static list's HTML for the javascript list's HTML when the button is pressed.
I need assistance converting the following C# code which works into VB code. The code detects when a specific type of USB device is connected and disconnected and writes the status to a status strip:
I don't think the problem lies within the codes but..The last thing I did was use datediff.. and show the result on a label.. and when I wasn't satisfied with the result I changed a few lines, and I noticed it was still the same whenever I run it.I've tried changing/deleting the codes to my forms but whenever I run the program, it still works. I even tried deleting the form and it still works.
Aim to achieve :I want to change the SourceData of the Pivot table.I want to change it from 'C:[file.xlsx]SheetName'!RangeName to 'SheetName'!RangeName
I have the following implementation :
[Code]...
At the time of error str has value 'SheetName'!RangeName (This is fine.. )
I am also getting a message box before the exception :
Can not open the source file C:file.xlsx (Isn't that obvious because its in use)
When trying to get this program to filter appointments based on which doctor is selected,the code works fine with a sample database. When I try to use the database I have to, it doesn't show any appointments.
I'm attempting to create an app which uses a vendor-supplied Web Service. They provided sample code to show how to work with the Web Service, but all the code is in C#.. not a huge deal.I opened one of their demo projects and it compiles fine, works perfectly.
So, I open up MY project, drop in the converted code and... wait for it... ERROR!Here is the working C# code that IS working:
C# private void DoSomethingWithTheAlarm(G4T.enAlarmAction action) { XML_AlarmClearRequest[] ClearRequest = new XML_AlarmClearRequest[lstAlarms.SelectedItems.Count]; int idx = 0; foreach (ListViewItem lvItem in lstAlarms.SelectedItems) { ClearRequest[idx] = new XML_AlarmClearRequest();
I made a bluring tool of some sort and you basicly drag an area of yuor picture and it blurs that certain selected elipsis.. the problem is THis only works on Winsows 7 Im trying to understand the diffrence but I can't. The PC uses the same graphic card same hardware just a diffrent OS but it wont do that Code. Anyways here is how I blur
Private m_ActiveControl As Point Private m_CurrentPoint As Point Private ileft As Integer
I have .net code that works on IE8 but wont work on google chrome or firefox. i have put this code for the user to press Enter instead of clicking the mouse everytime. [Code]. How can i make this work on different browsers?
It is a word scrambler in which the user must guess the word that is scrambled. It is not completed obviously but the code only works with one form. As soon as I include other forms for title screens and the likes, the code doesn't work at all.Here it is (This is the multiform version):
Imports System.Text Public Class Form3 Public word As New List(Of String)
I have a program that uses the mouse to find window captions. I made a test program that just does that and it works fine. I copied and pasted the code into my other program and it doesn't work. The mouse position changes, but it will only get the caption of a window if it is at the top of the screen. It seems that only the Mouse.X position is changing, but I put the MousePosition.X and Y in a label and they are both changing. Can anyone explain why this is happening?
When trying to get this program to filter appointments based on which doctor is selected, the code works fine with a sample database. When i try to use the database I have to, it doesn't show any appointments.
I have made a little Hotkeys utility for Poker Tables. I hook the keys and, depending from the key, I simulate a mouse click over the related table button.The Sub that make the job is this:
Private Sub DoMouse(ByVal flags As NativeMethods.MOUSEEVENTF, ByVal Wheel As Integer) 'wheel = +-120 if wheel event, 0 in other cases 'added hoping to improve the code, but nothing changes, Hwnd is a global variable
Private Sub DoMouse(ByVal flags As NativeMethods.MOUSEEVENTF, ByVal Wheel As Integer) 'wheel = +-120 if wheel event, 0 in other cases 'added hoping to improve the code, but nothing changes, Hwnd is a global variable
I have some code below that works mostly in vb.net but when it gets to ExtHubPort and after it doesnt work i think i might have incorrect formatting of code somewhere or a simple error because if I get it the same sounds as the vbscript except when mouse device is plugged in it gives me this error in device manager: "device could not start error 10". Here is the code but to plainly put it the code just adds an emulated external usb hub to the system's hub and then usb device to that hub:
Option Explicit On Imports System Imports Microsoft.Dsf Module Test_Emulator
[Code]...
The msgbox's mark important areas that will help if you wish to debug this code. I have a codeplex page in which the project has the dlls for both 32-bit and 64-bit OS's but if you have the dsf runtime you can manually get them from the GAC (c:windowsassembly version and yes im sure because thats where i found them) and just paste into visual studios public assmeblies folder and it
"Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated".I have this message showing up that references this code in the keyup event:[code]I am just testing the trapping of keys right now. The code still works but I am uncomfortable with an unresolved warning.
I have a simple unit test which tests that a validation function picks up a specific validation issue. The validation item returns a simple object with Item & Message properties. I've written a unit test for this function but this always fails even though I know the function works as expected.
<TestMethod()> Public Sub ContractNote_ValidateForManualInputTest_TradeOrderValueComparison() 'Can't get this test to work even though validation works! Dim CN As ContractNote = New ContractNote Dim Trade As New TradeOrder
[code].....
I've implemented IComparable on ValidationItem (I have a separate unit test which confirms this works). Am I Using CollectionAssert correctly?
I have a small problem, I have written a small application to update a database table. Now on my computer I have a copy of the database but using MSDE 2000 and when I run my application it works perfectly, however I also have a copy of the database attached to MS SQL 2005 on another computer. Now when I got an run my application on this machine, it fails with a "Time out" error. I have changed the timeout settings on the SQL Server however it then just sits there for ages, whereas when I run it on my development machine MSDE 2000 it loops through the code quickly.
I have developed an ASP.Net 2.0 application and I am facing problem in sending email from my Web Server. Following is the VB code I have used to send email from my web application. Thing is when I try to send email from my local system (laptop) the email goes out fine and reaches the recipient address instantly but when I try to send email from my web server it fails.My hosting provider gave me a relay-host address for sending out email. The email goes out fine but the relay host has an annoying amount of delay in email delivery which is a problem during the sign up process.
Here is the code I am using:I have imported system.net.mail in my code and used async="true" on the aspx page.
Private Sub SendMail(ByVal actcd As String) Dim mailMessage As New System.Net.Mail.MailMessage mailMessage.From = New MailAddress(support@ihomejobs.com)
[code]....
I have tried the above settings and they work fine from outlook and the application when tried on my laptop but these settings fail on web server.I want to send email from my web server without using a relay-host.
I have written a console app in <acronym title="Visual Basic">vb</acronym> .net 2003 to capture audio data (albeit not for an audio application) using the WinMM API. This works well in XP and also on my own Vista PC. However when others try to use in on Vista or Win7 it stops working after about 10 - 30 seconds (so it manages to initiate recording from the default input device but eventually stops). The only error given is "Program has stopped working". I am wondering if this is related to the way I recycle the input buffers?
I'm trying to change a code for text justification so that it works for urdu editor. The problem is when i justify code the alignment changes to left side. I mean cursor moves to the left side of rtb. In code the value of PFM_ALIGNMENT is set to 8. I wanna know what it means and if i hav to change then what value shud i use for making cursor stay at right side of rtb.