Showing posts with label value. Show all posts
Showing posts with label value. Show all posts

Saturday, March 24, 2012

Uploadfile behind an UpdatePanel

Hello,

After add an UpdatePanel, I don't have value for property filename of my upload control.

is there a workaround ?

thanks for your help

Hello

If you give look atUpdatpanel documentaion you will see note about that:

You cannot place file upload controls inside of UpdatePanel controls, because the data transfer interferes with partial page updates. File upload controls can be on the same page as UpdatePanel controls, but they must be placed on the page outside of UpdatePanel controls.

I hope this help

Wednesday, March 21, 2012

Urgent Help: Update Panel and Form Templates? - Need to finish this week ends.

Hello

I am new to ASP .NET so just wanted to confirm.

I actually tried a lot in regular asp .net website to update my textboxes when selecting a value from dropdown list.

but no luck.

so is update panel better in these cases. and does this work without having to code..

because i have two weeks left to this one page. and i was stuck on updating values of text boxes, checkboxes fields when updating ddl. i have ddl inside the formview template.

so when using update pannel: ddl will be outside the formview template??

how does it work basically??

please help asap.

thanks a lot all.

looking forward for reply.

surbhi

Have you use the OnSelectedIndexChanged event of the DDL yet ? Make sure you set the DDL AutoPostBack = true

No. I dont know how to use that event.

I am new and using VB for coding ..

Dont know how to use C#..

How do i use findcontrol statements in vb?

help asap. i have to finish it this week..

Thanks

Surbhi


You would probably benefit the most by looking at tutorials online then waiting for people to reply. Questions about events and c# or vb.net syntax can easily be answered by searching.

Well.. Ofcourse I have been looking online as well.

Not finding enough information on how to use this event..

Meanwhile here is my vb code for ItemUpdating event..

I dont know where I am making mistake. Correct me.. and I am using Formview, Sql DataSource.

and DropDownList which has project numbers. I just want to display new values when I select a different value in DDL. I have AutoPostBack=true and AppendDataBound =True..

Here is the code:

Private

Sub FormView1_ItemUpdating(ByVal senderAs Object,ByVal eAs FormViewUpdateEventArgs)'Dim ProjectNameTextBox As TextBox = FindControl("ProjectName")'Dim FormView1 As FormView = CType(sender, FormView)Dim rowViewAs DataRowView = CType(FormView1.DataItem, DataRowView)Dim rowAs FormViewRow = FormView1.RowDim ProjectNameTextBoxAs TextBox = CType(row.FindControl("ProjectName"), TextBox)

e.NewValues(

"ProjectName") = CType(row.FindControl("ProjectName"), TextBox)

ProjectNameTextBox.Text = rowView(

"ProjectName").ToString()

end sub

Use dynamic parameters when calling web service from javascript

Hello,

I would like to call a web services from javascript with dynamic parameters. I don't know the count and the value of the params that I'll set.

Here is a part of my code :

var serviceMethod =new Sys.Net.ServiceMethod(_servicePath, _serviceMethod, _appUrl);var paramArray =new Array(_serviceMethodParameters.length);for(var i = 0 ; i < _serviceMethodParameters.length ; i++ )

{

var toto = _serviceMethodParameters[i].get_Key();var tata = _serviceMethodParameters[i].get_Value();var elem = { toto : tata };

paramArray.push(elem);

}

_request = serviceMethod.invoke(paramArray, onMethodComplete, onMethodTimeout, onMethodError, onMethodAborted,

this , _timeoutInterval, _priority);

the problem that I have is actually I don't figure out the data format of the parameters

I would like the variable toto to be not interpreted as "toto", but as the content of the variable toto.

I could do this in another way, but I have to use this method to call a web service because I need to abort it if needed.

Any ideas about that?

Thanks in advance

Would something like this do the trick?

var elem = {};
elem[toto] = tata;
paramArray.push(elem);

Hope that helps,
-Hao


yes, it's working now, but now i've another problem : the parameter format is not correct.

When the webservice is called, it returns an error which is :

"error: Invalid object passed in, '{' expected. (1): [{\"last\":\"5000\"}]"


I actullay got it !! :)

I didn't need to use an Array to set the parameter but only a variable, kind of hashtable

I write the code if it could help someone who has the same problem.

here is the code :

var serviceMethod =new Sys.Net.ServiceMethod(_servicePath, _serviceMethod, _appUrl);var elem = {};for(var i = 0 ; i < _serviceMethodParameters.length ; i++ )

{

var toto = _serviceMethodParameters[i].get_Key();var tata = _serviceMethodParameters[i].get_Value();

elem[toto] = tata;

}

_request = serviceMethod.invoke(elem, onMethodComplete, onMethodTimeout, onMethodError, onMethodAborted,

this ,_timeoutInterval, _priority);