Posts

Showing posts from February, 2013

Play video in asp.net page

Hi, in this article i will shown how to play a video in asp.net page. am playing this video control using silverlight help. here am attaching a file that is running fine. Play video inasp.net page

Make sure AjaxControlToolkit. Properties. Resources. NET4.resources was correctly embedded

Error Message: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AjaxControlToolkit.Properties.Resources.NET4.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed. Reason: AjaxControlToolkit’s control load reference refers to the base System.Web.UI.Control method which is present as a part of the ASP.NET AJAX Libraries and those libraries are referenced only when the ScriptManager is referenced in the page. Solution: Add ScriptManager in the page and this error would be resolved. < asp:ScriptManager ID ="ScriptManager1" runat ="server" > </ asp:ScriptManager >

textbox validation in javascript From C#

Hi here i have a form. when am clicking the button i want to generate a alert box from c#. here is code.  Response.Write("<script>alert('hi');</script>");

CK editor with file manager in asp.net

Hi ,  in this post am showing a ckeditor  with file manager option. here is code. Ckeditor with filemanager

set input checkbox value in jquery using asp.net

Hi , here am getting a string in jquery and am splitting that string. Am assigning those values in asp.net page. if (separated[8] == "True") {                     $("#ContentPlaceHolder1_CheckBox2").attr('checked', true);                     $("#div3").show();                 }                 else {                     $("#ContentPlaceHolder1_CheckBox2").attr('checked', false);                     $("#div3").hide();                 }

Set dropdown Selected text using jquery

This is a method that works based on the text of the option, not the index. Just tested.   var theText = "GOOGLE" ; $ ( "#HowYouKnow option:contains(" + theText + ")" ). attr ( 'selected' , 'selected' ); Or, if there are similar values :   $ ( "#HowYouKnow option" ). each ( function () { if ( $ ( this ). text () == theText ) { $ ( this ). attr ( 'selected' , 'selected' ); } });

Converting a String to a TimeSpan using C#

Wondering how to convert to convert a String to a Timespan.. See below for an example snippet. TimeSpan myTimeSpan = TimeSpan.Parse(myString); (or) TimeSpan myTimeSpan; if (TimeSpan.TryParse(myString, out myTimeSpan)) {        // Do something } or var time = DateTime . ParseExact ( "17:00" , "HH:mm" , null ). ToString ( "hh:mm tt" ); returns 05:00 PM DateTime.ParseExact is returning DateTime Edited: Include CultureInfo var time = DateTime . ParseExact ( "17:00" , "HH:mm" , null ). ToString ( "hh:mm tt" , CultureInfo . GetCultureInfo ( "en-US" )); or            

get values from pagemethod to jquery

Hi , here i will explain how we can get the values from pagemethods. suppose if we r passing any values then we have to use sol (1). if we not passing any values to pagemethod then we haev to use sol (2). solution :-1 PageMethods.EventDetails(event.id, OnSuccess, OnFailure);             function OnSuccess(r) {                 alert(r);             }             function OnFailure(r) {                 alert(r._message);             } solution :-2  return PageMethods.DeleteControl(function (response) {                 alert(response);                 var abcd = response;          });

The value of the property '$' is null or undefined, not a Function object

this is solution to the above problem     if ( window . jQuery ) { $ ( document ). ready ( function () { DoStuff (); }); }