Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Monday, March 26, 2012

public CascadingDropDownNameValue[] GetAllDistrict(string knownCategoryValues, string cate

want to know whether i can pass more than two arguments in the above shown webservice method..i intend to implement it in a cascading drop down list.. having two sibling dropdown lists...

so i want to pass three arguments eg..cid, brid, deptid...but a webservice allows only two of the kind...

Hi,

You can pass more information via a third parameter contextKey. For instance:

public static AjaxControlToolkit.CascadingDropDownNameValue[]
GetDropDownContentsPageMethod(string knownCategoryValues, string category, string contextKey)

protected void Page_Load(object sender, EventArgs e)
{
CascadingDropDown2.ContextKey = "contextKeyOf2";
}

Hope this helps.

Saturday, March 24, 2012

Query string is diappearing, when using MaskedEditExtender

I had a page, where parameters were passed through query string.

I decided to include MaskedEditExtender in this page.

<cc1:MaskedEditExtender ID="meeIP" runat="server"
TargetControlID="txbIP"
Mask="999.999.999.NNN"
MessageValidatorTip="true"

MaskType="None"
InputDirection="RightToLeft"

</cc1:MaskedEditExtender>

After this my query string disappeared.

I cannt get the value from query string.( Request["siteID"];)

But when I comment out the ajax control everething gets fine and my query string is visible again.

What should I do?

Its my first time, when I'm trying to use ajax.asp.net.

Help...

Help.

Help!

Does anybody has an answere?

Question about OnClientClick for asp:LinkButton...

I have the code:

Code Behind .vb file:

Dim lbAsNew LinkButton

lb.Text = dt.Rows(j).Item(

0)

lb.ID =

"cat" +CType(dt.Rows(j).Item(1),String)

lb.CssClass =

"lbH1"

lb.OnClientClick =

"lb_Click('" +CType(dt.Rows(j).Item(1),String) +"')"

tc.Controls.Add(lb)

Client Side .aspx file:

<scriptlanguage="javascript"type="text/javascript">function lb_Click(e){

alert(e);

}

</script>

How can I tie this code in to talk to a Page Method or WebService? Any good simple links/tutorials? I tried the Ajax video page but apparently the sound drops out half way through the video? And my books refer to 'Atlas' instead of 'Ajax 1 or 2'.

You can add a onclick event handler like this:

AddHandler lb.OnClick, AddressOf lb_Click

And define a event handler method as below:

Protected Sub lb_Click(sender as object, E as EventArgs)

End Sub

If want to execute it asynchronously, you can decorate the above method with WebMethod attribute. Like this:

<WebMethod()> Protected Sub lb_Click(sender as object, E as EventArgs)

End Sub