Tuesday, August 7, 2012

what is the difference between wcf service and web service?

WCF is a programming model and API. "WCF Service" implies an app that is built using that programming model and API.
"Web Service" is an app that exposes an HTTP (REST (XML or JSON), SOAP or otherwise) interface.
You can build a Web service using WCF, but you can also build a Web service using other APIs or "stacks". Like PHP or Java, for example.
With WCF you can build web services but you can also build services that are not, "Webbish". For example you can build a service that accepts incoming binary requests over only a local pipe interface. It is still a service, but it is not a "web service" because it is not using web protocols (generally HTTP and XML).

reference

Friday, July 27, 2012

Get checkboxlist selecte items in a string with comma seprated

this is code to get  selected items in checkbox list as a string separated with comma or any delimeter you want to use like |(Pipe singn)

var selectedValues = (from item in chbBroadType.Items.Cast() where item.Selected select item.Value).ToArray();
var selectedValuesJoined = string.Join(",", selectedValues);

Get count of checkboxlist selected items

this is single line of code that can be used to get the number of items selected in checkboxlist in asp.net with c#

int count= ChbProperty.Items.Cast<ListItem>().Count(li => li.Selected);

Sunday, July 22, 2012

parthavi new photos (cool without hair )

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

parthavi atri

How to get java script variable value on server side

The answer is Hidden field or any input control.

You just need to take hidden field and set the value of  java script variable on hidden filed .like below

var javascriptvariable='some value'; 
$('#hiddenfield').val(javascriptvariable);
 
 
Now on server side you can get the hidden field which is 
actually java script variable  value 
 
String hdnvalue=hiddenfield.value;
 
I have used Jquery val function to set the value .
 You can use val function of jquery  in
two ways to get the value just use the 
 $('#hiddenfield').val(
 
and for setting the value you need to pass 
the value as argument in val function 
like this 
 
 
 $('#hiddenfield').val('31october') 
 alert($('#hiddenfield').val() );
 
 
you can check live demo here .
 
http://jsfiddle.net/VaKfP/255/
 
 
 I love http://jsfiddle.net/  for jquery code sharing.  
 
 
Thanks   

Friday, July 6, 2012

get the dropdown value and text using jquery

we have a drop down an ID, Name Pair.
Example

Rahul has ID of 1
Chand has ID of 2
Parthavi has ID of 3
When I do the followng:
alert($('#Crd').val());
and we select Rahul , we get 1

but in case we want selected text in jquery for a dropdown
then

$('#dropdownId option:selected').text();

Interview Question you might face ?

Reflection
Serialization
Stateless and statfull application
web service
jquery
json
Static Class
Static Class Inheritance
Abstract Data Type
DataAdapter and DataReader
Can we use session in Ajax

ASP.NET Core

 Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...