.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

imagebutton, sub signature, by ref

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :ASP.Net
Hi Below is my codeThe first 3 lines are run in the DataList1_ItemDataBound event and they call the sub below, of which there is the opening line.My question is if I change the signature from System.Web.UI.WebControls.Image toSystem.Web.UI.WebControls.ImageButton this still works and vice versa so it'll work in the found control is either a imagebutton or image.1. Can anyone explain why it does work fine either way?2. The ByVal ImgProfile As System.Web.UI.WebControls.Image, should this be ByRef, aren't controls passed by reference rather than value?Or I am getting this mixed up. The reason why I say this is I can modify the image control that's passed in and if it was passed by value then I shouldn't be able to modify the control, or should I?Dim Image1 As ImageImage1 = CType(e.Item.FindControl("ImageButton1"), Image)DisplayImage(UserID, Image1)Protected Sub DisplayImage(ByVal pUserID As String, ByVal pImgProfile As System.Web.UI.WebControls.Image)thanks.

View Complete Post

More Related Resource Links

I need help with imagebutton links


I have imagebuttons as links and i added the attributes for mousedown, up and out. That works fine.  I cant seem to figure out how that the imagebutton itself, when pushed, stays down and returns to normal when the user clicks another link....

what I was thinking of doing is calling a method on the onclick event of the button and letting it check whether there is another button pushed down then to send the found link button to its orginal state.

I figured doing the call and checking of the buttons would be long winded with the method, so there must be an easier way to do this ?




Digital Signatures: Application Guidelines on Digital Signature Practices for Common Criteria Securi


This article is an overview of digital signature practices and user considerations necessary to write applications in compliance with ISO/IEC 15408 Common Criteria security. Signing categories are described, including those that are a potential risk to the implied trust association that goes with a digital signature.

Jack Davis

MSDN Magazine November 2009

Infopath cannot load this form. Either the signature is corrupted, or the certificatie used to sign



I have a whole bunch of forms contains errors like whenever you try to open it up.

Infopath cannot load this form.  Either the signature is corrupted, or the certificatie used to sign this form is expired or revoked.

The forms were orginally created with digital signature with it.  But we were in the middle of transition from one company to another company.  The digital signature was no longer valid.  Actually, the certificate should have been expired by now.  I removed all the signatures for all of the forms.  So they can continue using the forms to fill in the information.  The problem right now, is trying to open the old forms with digital signature on it.   Not only the company has changed.  We also moved sharepoint from the old server to the new server.

Any idea to resolve th

Suppress postback on ImageButton


I have the following JavaScript defined for the OnClientClick event of an ImageButton:

var _oHasChanged = $get(_chkHasChanged); if (_oHasChanged && _oHasChanged.checked) { alert('De gewijzigde gegevens moeten worden opgeslagen alvorens deze actie kan worden uitgevoerd.'); return false; }

As you can see, I have "return false;" after the alert, because I don't want a postback in that situation.

This is working just fine in Firefox, but Internet Explorer seems to ignore the "return false;" bit and posts back to the server anyway.

What am I missing here?

Image or ImageButton rounded corners


Hiiiii Coders,

I just want to make corners of my asp.net image or imagebutton rounded. How can i do so?  

SQL Server JDBC: java.lang.SecurityException: Invalid signature file digest?

Hi I am following these instructions for using SQL Server JDBC driver and using sqljdbc4.jar file: http://msdn.microsoft.com/en-us/library/ms378526.aspx When registering the driver to instruct JDBC Driver Manager which driver to load: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); It throws and exception: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes What does this mean and how do I resolve it? NOTE: I followed a similar posting, but it did not resolve it: com.microsoft.sqlserver.jdbc.SQLServerException.class throws java.lang.SecurityException: http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/ab35688e-ca33-423e-a9bd-54e30fcb5091/ Thanks Jeff in Seattle

XML Signature xsd and Validation Error: Wildcard '##any' allows element causes the content model t

Hello,I'm trying to generate WCF client from Customer's WCF Service which has XML Signature options enabled.When trying to generate client proxy using svcutil I get following errors: Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation. All rights reserved. Attempting to download metadata from 'http://donex:51343/WebServices /Service.svc' using WS-Metadata Exchange or DISCO. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 13464 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:HMACOutputLength', and causes the content model to become ambiguous. A content model must be formed such that during validation of an element informati on item sequence, the particle contained directly, indirectly or implicitly ther ein with which to attempt to validate each item in the sequence in turn can be u niquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 14410 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:XPath', and cau

Why does WCF add two Signature elements in the SOAP header when using a TransportSecurityBindingEle

I try to call a web service that implements the following standards from a WCF client:   WS-I Basic Security Profile Version 1.0 Web Services Security X.509 Certificate Token Profile, OASIS Standard X.509 used for digitally signing digests of uploaded files and web service requests SOAP 1.1/1.2. HTTPS 1.1 I use the a CustomBinding created in the following maner: HttpsTransportBindingElement httpsTransport = new HttpsTransportBindingElement(); httpsTransport.ProxyAddress = new Uri("http://myproxy:8080"); httpsTransport.UseDefaultWebProxy = false; // the message security binding element will be configured to require // a client certificate used to sign the message TransportSecurityBindingElement messageSecurity = SecurityBindingElement.CreateCertificateOverTransportBindingElement(); // Create supporting token parameters for the client X509 certificate. X509SecurityTokenParameters clientX509SupportingTokenParameters = new X509SecurityTokenParameters(); // Specify that the supporting token is passed in message send by the client to the service clientX509SupportingTokenParameters.InclusionMode = SecurityTokenInclusionMode.AlwaysToRecipient; // Turn off derived keys clientX509SupportingTokenParameters.RequireDerivedKeys = false; // Augment the binding element to require the client's X509 certificate as an endorsing token i

Signature Capture App

Hi, I have a project at work that I would like to build using asp.net mobile controls. However I have one problem. Part of the mobile app requires that a signature is captured. Can anyone suggest a awy of doing this? The only way I can think of is to use GDI, but that would require use of the .net compact framework. Even using GDI, there is still the problem of getting that back to the server. Any suggestion would be very welcome, Mark

SharePoint read/recognize a Digital Signature in Word (XML Content Control Mapping)?

I am using Content Control Mapping to pull certain fields from a Word Document and include it as columns when a document is uploaded into a Document Library. We're using MOSS 2007 and Word 2007. It is required that the user digitally signs the document before uploading.  Is there a way to get the signature to appear as a column in a similar fashion?  I'm new to this mapping business, and Google hasn't been much help. I realize I could use the Collect Signatures workflow, but that seems cumbersome to 1) have the user submit it, 2) have an admin open each document and start the workflow and 3) have the user THEN sign the document.  That's more steps than simply manually opening and verifying digital signatures. I figure I'm missing something obvious here.  Any help or ideas would be appreciated.

SSIS 2005 - Send Mail Task - signature appended to email is garbled - unicode problem?

Hi, I'm pretty new to SSIS so go easy on me. I have a Send Mail Task to notify if a file cannot be imported - the mailbody is created on the previous step by a VB.NET script task to include the name of the file and the path it's been archived to. The problem I'm having is that while the body of the email I've created is displaying fine, our company's Exchange server appends a signature to all emails, and this is coming up as undisplayable characters, presumably due to some kind of unicode encoding problem. I've tried casting the email body in an expression to DT_STR (doesn't work as DT_STR "cannot be converted to a supported type" which seems a bit odd but never mind), DT_WSTR (garbled signature), DT_TEXT/DT_NTEXT (strange error on this one - "Attempted to read or write protected memory") none of those ideas worked, and I'm a bit stumped now. Can anyone help? I'm using SSIS 2005 with SP3

Verification of signature "revocation server was offline"

Hi, I have to verify a (detached) signature from a third party. I am using System.Security.Cryptography.Pkcs.SignedCMS (VS2008) to validate the Signature. The verification of the data works fine. But when I try to verify the used certificates I always get that the intermediate certificate is not valid. The ChainStatus returns RevocationStatusUnknown (UnknownError) and OfflineRevocation (UnknownError) even if I set the RevocationMode to NoCheck on the chain. Dim byteData() As Byte = IO.File.ReadAllBytes(DataFile.FullName) Dim byteSignature() As Byte = IO.File.ReadAllBytes(SignatureFile.FullName) Dim ciData As New Pkcs.ContentInfo(New Oid("data"), byteData) Dim Verifier As New Pkcs.SignedCms(ciData, True) Try Verifier.Decode(byteSignature) Verifier.CheckSignature(True) Catch crex As CryptographicException ' Signature is not valid Catch ex As Exception ' Verification failed End Try For Each SignatureCertificate As X509Certificates.X509Certificate2 In Verifier.Certificates Dim certChain As New X509Certificates.X509Chain(True) certChain.Build(SignatureCertificate) ' Build the certificate chain from the signers certificate certChain.ChainPolicy.RevocationMode = X509Certificates.X509RevocationMode.NoCheck For Each certElement As X509Certificates.X509ChainElement In certChain.ChainElements If Not certElement.Certificate.Verify() Then ' Cert

How can i route to different actions having same signature if i don't want to pass action name in U

I am having one controller Test having following actions (1)public ActionResult ABC (string parameter1, string parameter2)       (2)public ActionResult XYZ (string parameter1, string parameter2,string parameter3, string parameter4)       i have added following html.routelinks  <%= Html.RouteLink("ABC","ABC", new { parameter1 = 100, parameter2 = 200 } )%><br /> <%= Html.RouteLink("XYZ", "XYZ", new { parameter1 = 1000 , parameter2 = 2000 }) %> last two parameters in XYZ action are optionals so i have not passed them in Html.routelink  routes.MapRoute("ABC", "Test/{parameter1}/{parameter2}", new { controller = "Test", action = "ABC", parameter1= 0,parameter2=0 }); routes.MapRoute("XYZ", "Test/{parameter1}/{parameter2}/{parameter3}/{parameter4}", new { controller = "Test", action = "XYZ", parameter1=0,parameter2=0 ,parameter3=UrlParameter.Optional,parameter4=UrlParameter.Optional}); In above senario in both cases same route "ABC" is called eventhough i have clicked on second Html.routelink.can anyone solve this issue ? how can i route according to route name instead of number of parameters?

Save an ImageButton to the viewstate?

Hi!I have created a custom control that extends the class ImageButton, the thing is that I now also want to save this control to a viewstate...is there anyway to do this?Thanks in advance!

ImageButton does not fire

Hi.I have the following image button:<asp:ImageButton ID="submit" EnableViewState="true"                                   ImageUrl="/images/btn_submit.png" AlternateText="Submit" CssClass="f-right"                                 runat="server" onclick="submit_Click"></asp:ImageButton>The event is fired in Firefox but not in IE*. anyone any ideas?ThanksJason.

Click imagebutton open window.open in class asp.net 2.0

Click imagebutton open window.open in class asp.net 2.0

Disable "enter" click on imagebutton

When i press "enter" i dont want the first button that is on my page getting fired. This is a imagebutton. I did try with a javascript function that checks the event keycode but this always returns 13.<script language="javascript"> function noEnter() {  if (event.keyCode == 13) {  return false;    }  }  </script> When i add OnClientClick="return false;" then you can't press the button at all.<asp:ImageButton ID="backButton" runat="server" CausesValidation="false" ImageAlign="AbsBottom" ImageUrl="../../images/Global/back.gif" OnClientClick="GoBack2_Click" OnClick="GoBack_Click" OnClientClick="return false;"/> When i click with the mouse on the button the Goback function does not get called. So what i'm trying to get here that the imagebutton need to be clicked with a mouseclick and not with and enter keystroke. ty ;)      
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend