C# - Passing Array From Aspx.cs To Xaml.cs?

Oct 2, 2010

Is there a way to pass an array or List<> from the aspx.cs to xaml.cs?

View 1 Replies


Similar Messages:

Passing C# Code From Aspx To Xaml

Sep 17, 2010

Does anyone know how to do this? Specifically I have two arrays and some floating point numbers in an aspx.cs file and want to use it for a web silverlight app (xaml.cs).

View 2 Replies

How To Call Multiple Xaml File In Aspx, - How To Convert Xaml To Xap

Mar 16, 2011

I am silverlight 3.0 with .net framework 4.0. I want to create a wen based application using silverlight am using multiple xaml files, to call xaml files i need to make xap file how to convert xaml to xap in clientBin, abd how to use multiple xaml files (Like company.xaml, NewEvent.xaml, mainPage.xaml etc.) in aspx page.

View 1 Replies

Web Forms :: Xaml In Aspx - Keep Two In Table?

Mar 11, 2010

I am creating a web application in .net using C#, asp.net and silverlight. I have creating some files in silverlight ie., TopContent.xaml and middleContent.xaml. I want to embed these two xaml pages in defaul.aspx page. I have created table in default.aspx I want to keep these two in table.

View 2 Replies

Redirect Aspx Page To Xaml Page

Mar 19, 2011

I have a startup page as Menu.aspx I want to redirect this page to login.xaml so that whenver user type Menu.aspx it should open login.xaml then this .aspx page.

View 1 Replies

ADO.NET :: Passing An Array To Stored Procedure?

Mar 21, 2011

I want to send an array of integer to sql server Stroed Procedure as parameter from vb program. How i can do this.

Secondly how I declare an parameter array in stored procedure which accept the array of integer.

View 1 Replies

Passing Multidementional Array As Paramater In Method?

Sep 10, 2010

i want to pass multidementional array as parameter, below the code i worked, is it right

class ASRateContract
{
public string[,] standardrate = new string[3,2];
public string[,] storagerate = new string[3,3];
public void setstandardrate( string [3,2]name )
{
standardrate = name;
}
public string setstoragerate()
{
return "";
}
public string getstandardrate()
{
return standardrate;
}

View 6 Replies

C# - Passing Reportparameter Array To Web User Control?

Jan 20, 2010

I have a user control that contains a reportviewer control.And I want to send an array of reportparameter to my user control.But I can't figure out how to do.I'm getting "Object reference not set to an instance of an object. ".My param_reportParam variable is null in usercontrol.My user control's parameter is like that ;

[Browsable(false)]
public ReportParameter[] param_reportParam [code]....

And a simple page that uses user control to show server reports is like that ;

ReportParameter[] parameters = new ReportParameter[4];//parameter number can be different
parameters[0] = new ReportParameter("imza", imzalayacaklar);
parameters[1] = new ReportParameter("Sayi_Son_Eki", "984");
parameters[2] = new ReportParameter("PersonelTip", "2");
parameters[3] = new ReportParameter("parafli", "1");
wuc_rapor_genel1.param_reportParam = parameters;//this is my usercontrol

View 1 Replies

MVC :: Passing String Array To The View Using ViewData?

Dec 28, 2010

on the controller, i am passing my string array to the view using ViewData.

[Code]....

on the view, i cated the viewdata to string array, and made a select list.

[Code]....

but if i run the website, i get this error :

[Code]....

View 5 Replies

Databases :: Passing Array Or Table Data Type

Oct 21, 2010

I need to pass many records with number of fields(i.e 5rows and 5 columns) in either array or table form to oracle for processing. Is it possible to pass array/table from asp.net pages? If no, any solutions for this? I have been thinking of passing it as string concatenated with delimiter and split it. Seems like it is not appropriate as i have to pass 5 strings(5rows)

View 2 Replies

C# - Passing An Array Of Values In A JQuery Ajax Post?

Oct 13, 2010

I have a ListBox on my page, and I'd like to make an AJAX post containing all the selected items. Here's my code:

[code]...

I'd like to pass in the selected values either as an array, or a comma-delimited string. What's the best way to pass that data, and how can I do it?

View 3 Replies

SQL Server :: Passing An Array From C# Code-behind To Stored Procedure?

Nov 2, 2010

Via the button1_ click event I retrieve all files in a directory (Example Follows)

[Code]....

I now need to check whether this filename exists as a field in a SQL Server table. For example, if the directory retrieves a file named ExampleFile.txt which does not exist in the (Table = TableFileStore;s Field = FileRetrievals) then I want to insert the filename.

How do I construct a stored procedure to pass the filename(s) into a stored procedure as a parameter? Do I need to also create an array of filenames and pass the array into my stored procedure? Does the stored procedure belong within the foreach loop?

View 3 Replies

C# - Passing Array List Of Specfic Type To The Web Service

Mar 31, 2011

How to Pass array List of specfic Type To the Web Service?

View 1 Replies

SQL Server :: Passing Array Paramaters To Stored Procedure?

Nov 1, 2010

I need to send an array of strings to a stored procedure and then use that array of strings to create a filter of the data returned.for example I need need to send the following array to the strored procedure:

[Code]....

and use that array to run the fillowing sql command:

[Code]....

View 17 Replies

Web Forms :: Passing Array Or Object To Javascript Function Using ICallbackEventHandler?

Feb 11, 2011

How would I pass an Object or Array to a function using the ICallBackEventHandler (RaisCallbackEvent)? It allows for a string argument only, if you change it to another datatype it error out. Sample Below...

[Code]....

[Code]....

View 6 Replies

State Management :: Passing Multiple Array Values Through A Query String?

Feb 16, 2011

I have a query string which contains the value of more than one Array, I want to pass these values from Page 1 to Page 2 and then distribute the array values into new arrays on Page 2.

Here is what I have so far.

Page 1

[Code]....

[Code]....

Page 2

[Code]....

All that I get returned in EFFinal and IFFinal is System.String?

View 5 Replies

Custom Server Controls :: Passing Reportparameter Array To Web User Control?

Jan 20, 2010

I have a user control that contains a reportviewer control.And I want to send an array of reportparameter to my user control.But I can't figure out how to do.I'm getting "Object reference not set to an instance of an object. ".My param_reportParam variable is null in usercontrol.My user control's parameter is like that ;

[Browsable(false)]public ReportParameter[] param_reportParam{ get { return _param_reportParam; } set { _param_reportParam = value; }}private ReportParameter[] _param_reportParam;

And a simple page that uses user control to show server reports is like that ;

ReportParameter[] parameters = new ReportParameter[4];//parameter number can be different parameters[0] = new ReportParameter("imza", imzalayacaklar); parameters[1] = new ReportParameter("Sayi_Son_Eki", "984"); parameters[2] = new ReportParameter("PersonelTip", "2"); parameters[3] = new ReportParameter("parafli", "1"); wuc_rapor_genel1.param_reportParam = parameters;//this is my usercontrol

View 3 Replies

How To Use Public Static Array In Default.aspx

Mar 23, 2011

Can I put public static int[] MyArrayCounter declared in separate class Main.cs into webpage Default.aspx between code tags <%= %>?

More info of what i do:

I have declaration in Main.cs:

[Code]....

In class Checking.cs i fill MyArrayCounter with 29 values. After code execution ends, i'd like my Default.aspx page to bind to that MyArrayCounter values like:

Label1.Text = MyArrayCounter[0]
Label2.Text = MyArrayCounter[1]
etc.

View 2 Replies

Web Forms :: Passing Value To Another Aspx Page?

Jun 15, 2010

I am trying to pass a value from one aspx page to another using test2.aspx?Tag=blah.

When I try to pass Request.QueryString["Tag"] to a webusercontrol on test2.aspx it tells me that Request.QueryString["Tag"] is null or empty.

I am doing this in the page load. Should I be doing it somewhere else ?

View 21 Replies

Passing An Array From Child Page To Parent Page?

Mar 15, 2010

I have a listbox containing a list of the datas In the child page. Now, if a user selects a multiple number of the items of the listbox, i have to pass all of them through the session.

So, i want to create an array in the child page and pass the values in the session and in the form of an array to the parent page.

View 16 Replies

SQL Reporting :: Passing Authentication Using The ASPX Control?

May 4, 2010

I have WebServerA running an ASP.Net website. I have ReportServerB running Reporting Services and hosting reports. Users authenticate to WebServerA using Windows Authentication and all sites have identity impersonate=true. Reporting Services on ReportServerB is also set to Widnows Authentication.

Viewing reports directly via the /ReportServer or /Reports URLs works fine. Viewing the reports in the ASPX control works fine when you're on the local machine (on the console of WebServerA or when running the ASPX on a developer workstation). Viewing the reports in the ASPX control from another machine results in a 401 Unauthorized error in the report control.

I assume something needs to be done with respect to SPNs to make this work. I'm not interested in a solution that involves writing code inside the ASPX page to handle authentication.

What SPN is needed? For WebServerA or ReportServerB? For what account (SPNs seem to want an account associated with them)?

Searching for answers on this issue is a bit cloudy due to repeated posts about a loopback registry change, which isn't my issue. My issue is with handling the double hop for authentication. There seem to be a number of other solutions involving allowing anonymous access to Reporting Services, which is not viable for me.

View 1 Replies

Passing Selected Value Of A Dropdownlist To A Parameter In Aspx?

Apr 6, 2010

I have a grid and dropdownlist.I want to filter values in a grid by the selection of dropdownlist.How Can i do this? My code is like this

[code]....

How can i pass the selected value of dropdown list to @VisitedVol .

View 3 Replies

Dynamically Passing Parameters From ASPX Host

Aug 5, 2010

I am looking for someone to provide guidance as to whether the following solution is the prescribed way of going about this. Yesterday I started working on a problem that, at first blush, seemed pretty simple and straightforward. I need to pass a few parameters from an ASPX code-behind, which hosts a Silverlight object tag, to the code-behind of one, or more, of the Silverlight user controls within the hosted Silverlight application. So, after doing some research, this is the basic solution I developed.

I found out that an attribute can be added to the object tag called initParams, a comma delimited list of parameter names and values can be added to this attribute. Like so.

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/SampleApplication.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40624.0" />
<param name="autoUpgrade" value="true" />
<param name="initParams" value='DealerId=17' />
</object>

This is fine, except that the DealerId parameter is basically hard-coded in the object tag, not real useful. The next thing that I did was replace this object tag with a literal control, and set the text of the literal control within the page's code-behind to the value of a StringBuilder (where I built up the full object tag along with dynamically adding the correct DealerId value). In the following example, the DealerId is hard-coded, but you get the idea.

var sb = new StringBuilder();
sb.Append(@"<object data=""data:application/x-silverlight-2,"" type=""application/x-silverlight-2"" width=""90%"" height=""80%"">");
sb.Append(@"<param name=""source"" value=""ClientBin/Ascend.SilverlightViewer.xap""/>");
sb.Append(@"<param name=""onError"" value=""onSilverlightError"" />");
sb.Append(@"<param name=""background"" value=""white"" />");
sb.Append(@"<param name=""minRuntimeVersion"" value=""3.0.40624.0"" />");
sb.Append(@"<param name=""autoUpgrade"" value=""true"" />");
sb.Append(@"<param name=""initParams"" value='");
sb.Append(@"ServiceUrl=");
sb.AppendFormat("http://{0}{1}", Request.Url.Authority, ResolveUrl("~/ReportService.svc"));
sb.Append(@",DebugMode=Full");
sb.AppendFormat(@",DealerId={0}' />", 40);
sb.Append(@"</object>");
litObjectTag.Text = sb.ToString();

My goal, if this initial design is sane, is to then pull this object tag creation into a server control, which will have a DealerId property, which in turn will be set within the hosts code-behind. At this point, I have the host dynamically adding parameter values to the object tag's initParams attribute, the next step is to get these values and leverage them within the hosted Silverlight application. I found a few articles to help out with this; I'm creating a public dictionary within the App.xaml.cs, and setting it within the Application_Startup event.

public IDictionary<string, string> InitConfigDictionary;
private void Application_Startup(object sender, StartupEventArgs e)
{
InitConfigDictionary = e.InitParams;
this.RootVisual = new MainPage();
}

Now, I can access this public dictionary from the code-behind of any .xaml user control, like this.

App app = (App)Application.Current;
var dealerId = app.InitConfigDictionary["DealerId"];

This design works just fine, I'm just looking for some guidance, since I'm new to Silverlight. Once again, the implementation works, but it seems like a whole lot of work to go through just to pass a dynamic value from the host to the .xaml files. Because I'm new to Silverlight, I'm hoping that someone with more experience can say that either:

a) Patrick, you're insane, why are you going through all this work when clearly in Silverlight you would accomplish this through the use of "xxxxxx".
b) Yeah, Patrick, it's a drag, but this design is basically what you have to do in Silverlight.

View 1 Replies

ADO.NET :: Passing Values From Data Layer To Aspx.cs?

Mar 4, 2011

I m having a SQlmsg in data reader at data layer DL and i want that message on my aspx.cs page on a lable....

View 2 Replies

Architecture :: Passing Objects Between Aspx Pages?

Jan 21, 2010

I have an application that uses DataContracts/DataMembers and Serialization to store information entered in a tab control. There are 8 tabs in the control (therefore 8 aspx pages). The final tab is used to write the information to disk.I am trying to understand: When should serialization be used in a web app? The objects are stored in memory not on disk. Is this another means of passing objects between aspx pages? If so when should serialization be used vs. session objects? How long is the serialized object retained in memory?Can I get a simple example of how to serialize in one page and deserialize the object in another page?I've read many blogs regarding serialization but have yet to find a simple example and none of them explain when serialization should be used vs. session objects?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved