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


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali
Post New Web Links

how to hide jquery code or encode that no body read this code

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net
 

how to hide jquery code or encode that no body read this code




View Complete Post


More Related Resource Links

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

CLR Profiler: No Code Can Hide from the Profiling API in the .NET Framework 2.0

  

The common language runtime (CLR) profiling API makes available information about the application domains, assemblies, and classes that are loaded and used in a process, just-in-time (JIT) compiler notifications, memory usage tracking, tracing of events, exception tracking, managed to unmanaged code transitions, and the state of the runtime. And if that weren't enough, you will find a nicely enhanced profiling API in the .NET Framework 2.0. Find out what's coming up in this next version.

Jay Hilyard

MSDN Magazine January 2005


Use DB query result to generate Jquery required lines of code

  

Hello

I 'm gonna query database for photo records. each record include "photo path" where imagesURL  stored in string format

 I Choses my favorite Juqery plugin to show images. Plugin needs some lines of code like below.

How could I  generate these lines

<script>
$(function() {
$('#slideshow').crossSlide({
sleep: 2,
fade: 1
}, [
{ src: 'picture1.jpg' },
{ src: 'picture2.jpg' },
......
.....
{ src: 'picture4.jpg' }
])
});
</script>

Sign outgoing body from client with custom endpoing behavior defined in code

  
I'm trying to sign (and sign only) the body of every outgoing message that uses this custom endpoint behavior.  When I first created this it was for signing a custom SOAP header.  We are moving away from that and going to just sign the body.  We have some applications that have 10+ web service references.  We don't want to touch the reference.cs for anything.  Below is the code I had before for signing the custom soap header.  I'm trying to modify it to just sign the body.  My modified code is below, and the error I get. Private Class CustomHeaderBehavior Implements ServiceModel.Description.IEndpointBehavior Public Sub New() End Sub Private Sub AddBindingParameters( _ ByVal endpoint As ServiceModel.Description.ServiceEndpoint, _ ByVal bindingParameters As ServiceModel.Channels.BindingParameterCollection) _ Implements ServiceModel.Description.IEndpointBehavior.AddBindingParameters Dim body As New Xml.XmlQualifiedName("Body", "http://schemas.xmlsoap.org/soap/envelope/") Dim BodyMsgPartSpec As New ServiceModel.Security.MessagePartSpecification() BodyMsgPartSpec.IsBodyIncluded = True Dim requirements As ServiceModel.Security.ChannelProtectionRequirements = bindingParameters.Remove(Of ServiceModel.Security.ChannelProtectionRequirements)() requirements

Ajax/Jquery code on UserControls

  
Hello,I have some user controls where I would like to add some javascript that uses Ajax and Jquery technology. Also these scripts should use Sys.WebForms.PageRequestManager.getInstance().add_endRequestand other functions of the Ajax framework.In the past I have added the related code to the hosting aspx page but it becomes a problem when re-using the same control in multiple aspx.Which are the best practice to follow in this case?Regards

JQuery Plugin: calling jConfirm from asp.net (code behind)

  
i am using jquery plugin and i got stuck in how to display the confirmation window from code behind and if the user choose "ok" than go ahead delete otherwise ignore. jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) { jAlert('Confirmed: ' + r, 'Confirmation Results'); }); anybody have done similar?  

Get asp.net radiobuttonlist selected value in code behind when using jQuery buttonset

  

I am using the jQueryUI buttonset on an ASP.NET radiobuttonlist. I need to get the selected value in server-side code when the page posts back. If I don't apply the jQuery buttonset, this is of course easy enough - just grab "SelectedValue". However, when I do apply jQuery buttonset, the selected value does not appear to be available on postback any longer. Is there any way around this, or do I need to get the selected value on clientside, and then pass it back myself?

<asp:RadioButtonList ID="RadioButtonList0" CssClass="ratingButtons" runat="server">
    <asp:ListItem Text="Option1" Value="1"/>
    <asp:ListItem Text="Option2" Value="2" />
    <asp:ListItem Text="Option" Value="3" />
    <asp:ListItem Text="Option4" Value="4" />
</asp:RadioButtonList>

  $(function () {
      $(".ratingButtons").buttonset();
      $(".ratingButtons").click(function () { return false; });
  });


 


JQuery: is there a way to show status message - from code behind?

  

i am trying to figure out how to display message box after it done executing the server side code

 here is the code which works from the client side but still looking for a way to make it work from code-behind

.aspx

<div id="status"></div>

script:

$("#status").fadeTo(500, 1, function() { $(this).html("You are now registered!").fadeTo(7000, 0); })


How read flowdocument xaml to make available in vb code

  

I'm very very new to WPF and not particularly experienced in VB.Net (mostly a VBA man) so forgive me if this comes across as completely idiotic, cause it more than likely is :-( .....

The problem I have is that I want the user to have the ability to insert buttons into a richtextbox and be able to put essentially as many buttons as they like in and amongst some text.... simple enough....

Problem is I'm finding this impossible with my limitted knowledge of anything WPF related.....

I can use the following code to allow the user to double click in the rtb at a certain point and the code will go off and create a flowdocument (in vb) with an inline container with a button in it and then merge the text from the rtb with the flowdocument.... 

 

FIRST CREATE THE FLOWDOC WITH JUST A BUTTON

 Dim WithEvents aButton As TextBox = New TextBox (class level variable)

Dim aFlowDocument As FlowDocument = New FlowDocument

Dim bparagraph As Paragraph = New Paragraph

        bparagraph.Inlines.Add(New InlineUIContainer(aButton))

        aFlowDocument.Blocks.Add(bparagraph)

 

AND THEN READ THE RTB CONTENT AND MERGE IT WITH THE FLOWDOC ABOVE WHICH RESULTS IN ANOTHER FLOWDOC THAT i CAN SET A RTB TO SHOW AND SO I NOW HAVE THE TEX

Very Simple JQuery code does not work

  

Hi everyone,

How come the following code does not work ?  If you can, please make the following code to work for me.

Thanks,

Cecilia

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CookiePage1.aspx.cs" Inherits="CookiePage1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script type="text/javascript">

        function SetCookie(T) {

            //Create (or update) the value of a cookie to expire in 2 days:
            $.cookie('ShoppingCartId', T, { expires: 2 });

        }

        function ReadCookie() {
            
            var SCId = $.cookie('ShoppingCartId');

            return SCId;

        }

        $(document).ready(function () {
            var T = "Testing Cookie";
            SetCookie(T);

            $('.MyShoppingCartId').append(ReadCookie());

        });       

</script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="MyShoppingCartId">       
    <

Any Example DotNetAge Jquery Library with source Code

  

Any Example DotNetAge Jquery Library  with source Code


Fast read only, forward only cursor from managed code.

  

I am refining some design after testing other parts of it, this is all going well but we need to now improve the data reading part, doing a bulk "SELECT *" was fine for testing, but is no good for massive tables.

We have a managaed stored proc, coded in C#, we use this to copy a table over a network to a special server of our own, this is an ocassional one-off operation.

I want to recode this stored proc, so that we enumerate a row at a time (or 'n' rows, e.g. 10, 20 etc) and send these over the network.

Doing this iteratively is the goal, I read a little recently about Server Side Cursors which seem ideal, especially for tables with 500,000 rows +

Does ADO.NET provide any managed classes for doing this?

We use .Net 3.5, Visual Studio 2008 and SQL Server 2008 R2.

Performance is key, you can assume that the database is not being updated when this operation is run.

Thanks

Cap'n

 


Any better than jquery dynamically write html code?

  

I am creating a page which contains one grid showing the content from a very slow data source. There are other faster contents to be displayed too.

I know I can use jquery to dynamically generate the html code from a dedicated controller for the slow data source. 

However, it's not intuitive to read the jquery code for the grid. is there any better way?


Reducing Code by Using jQuery Templates

  

imageNearly every language out there uses templates in some shape or form to minimize the amount of code that has to be written in an application. By using templates you can define a template structure once and use it to generate code, HTML or other formats. If you've created ASP.NET applications then you're aware of how powerful and productive templates are when it comes to generating HTML output. However, what if you want to use templates on the client-side to generate HTML rather than writing a lot of JavaScript to manipulate the DOM?

Although templates have been available in jQuery for quite awhile through various plug-ins, the latest template framework worked on jointly by Microsoft and the jQuery team provides a great solution that doesn't use CSS in strange ways or require a lot of knowledge about a template language. By using it you can define HTML templates in web pages and use them to render HTML output dynamically at runtime. I'll cover the basics of using

read a overlength string in code from a DMX query

  

hello , when i using  the DMX obtain the rules of mining model J26, then i want to show the rules on interface, but when i excuting code:

               string dmx = "SELECT FLATTENED NODE_DESCRIPTION as rule FROM J26.CONTENT WHERE   NODE_TYPE = 4            and MARGINAL_PROBABILITY>0.5 and node_support>0 ";

                AdomdDataAdapter ada2 = new AdomdDataAdapter(dmx, conn);
                DataTable temTable2 = new DataTable();
                int MaxRow = 8000;
                temTable2.MinimumCapacity = MaxRow;
                ada2.Fill(temTable2);
                 string RTRule = temTable2.Rows[0][0].ToString();

it throws out an error: there is no rows in temTable2.

and RTRule is null .

so ,could

How to read parameters from URL and put them into HTML code?

  

I am writing an "external link exit page" where anytime a user clicks on an external link on my site, it navigates to a page exit.html that says "Please note that you are leaving our website, and therefore we are not responsible for the content of the website you are about to visit." I was thinking of puting the destination URL as a parameter, so for example a section of links on my website might look someting like this:

 

<h3>Other Sites You Might Find Useful</h3>
<a href="exit.html?url=http://www.google.com">Google</a><br />
<a href="exit.html?url=http://www.yahoo.com">Yahoo!</a><br />
<a href="exit.html?url=http://www.weather.com">weather.com</a><br />

 

So in exit.htm I have a parameter called url that needs to be decoded and placed in my HTML source. After I display the warning message I want to give the user the option to either go back or continue to the externall url.

 

<h3>You are now leaving our website. Please be advised that we are not responsible for the content of the website you are about to visit. </h3>
<h4>Are you sure you want to continue?</h4>

<a href="[URL parameter]">Yes! Continue to [URL parameter]</a><br /> <a href="javascri
Categories: 
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