.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

How to Pass Values between two Entity Picker?

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :SharePoint
 
Hi All, I am implementing the SharePoint custom fields to pull the data from the SQl Database. This custom field contains two entity picker (like people picker) where the first one will get a record from the Parenet records and second picker has to get the record based on the parent selection. Everything works fine except passing the first entity picker value to second one. Any one has any ideas how to do this? I am trying to use the custom Property in the follwoing way public     RecordPickerData PickerData {     get {     string s =     if (_pickerData == null && String.IsNullOrEmpty(CustomProperty) == false) {     byte[] buffer = Convert.FromBase64String(CustomProperty);     using (MemoryStream stream = new MemoryStream(buffer)) {     BinaryFormatter formatter = new BinaryFormatter(); _pickerData = (   RecordPickerData)formatter.Deserialize(stream); } }     return _pickerData; }     set {     if (value != null) { _pickerData =   value;     using (MemoryStream stream = new MemoryStream()) {     BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(stream, _pickerData); CustomProperty =   Convert.ToBase64String(stream.ToArray()); }


View Complete Post


More Related Resource Links

How to Pass Values Between Web Pages ASP.NET

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.

How to Pass Values Between ASP.NET Web Pages

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.

How to pass values from webgrid1 and webgrid2 to webgrid3

  
I want to pass the values from webgrid1 and webgrid2  to webgrid3 one with checkbox or radio button selection. When i hit the button i want to pass the selected values from each webgrid to the third one.Is that possible?

How to pass values using http header to another domain?

  
Hi,There are two applications "Sender", "Receiver"."Receiver" is a asp.net page, running in a server"Sender" is not an asp.net page and running in some other server."Sender" is passing a string (eg. userName) through http header."Receiver" is reading the string from http header as follows        Request.Header["userName"].How to pass values through http header? Can I have some samples?Thanks,Ashokan

Pass values From Html.BeginForm To Controller

  
I'm using 2 submit buttons. <form id="form1" runat="server"> First name :<asp:TextBox ID="FNanme" runat="server" /><br /> Last name :<asp:TextBox ID="LName" runat="server" /><br /> </form> <% Html.BeginForm("ActionName", "ControllerClass", FormMethod.Post); %> <input type="submit" name="submitButton" onclick=" return popUp1Msg()" value="Reject" /> <input type="submit" name="submitButton" onclick=" return popUp2Msg()" value="Accept" /> <% Html.EndForm ( ); %> On every submit, Popup appears with Ok and Cancel buttons.When user select Ok. How can I pass FName and LName values to controller? Thanks  

bind values for the drop down based on people picker value change

  
hi, i have a two lists in my sp. list 1 name  items user1 item1 user1 item2 user2 item1   and list 2 is in this way in this i have a people picker and a drop down when ever i change the name in people picker the value should get filled from list 1 and fill in drop down list so i need to get the on text changed event of people picker and bind it in the dropdown list could some help me out in fixing thisjayaraja

bind values for the drop down based on people picker value change

  
hi, i have a two lists in my sp. list 1 name  items user1 item1 user1 item2 user2 item1   and list 2 is in this way in this i have a people picker and a drop down when ever i change the name in people picker the value should get filled from list 1 and fill in drop down list so i need to get the on text changed event of people picker and bind it in the dropdown list could some help me out in fixing thisjayaraja

Pass values between user controls on 2 different aspx pages

  
I have 2 user controls that is hosted by 2 different aspx pages.example: srcpage.aspx --> hosts the --> sourceusercontrol.ascxanddestpage.aspx --> hosts the --> destinationusercontrol.ascxI would like the values in the text fields of the sourceusercontrol.ascx to be passed on to the labels in the destinationusercontrol.ascx. I have gone through the MSDN ASP.Net examples and i was able to successfully pass values between two aspx page using the postback URL functionality, but cannot do the same thing with the usercontrols on 2 different aspx pages. Any suggestions would be helpfull....! Thanks..! 

How to pass string values to parameterized sql query in Clause?

  
Hi,I'm using parameterized sql query to get data from database string query = "Select * from employee where employee_city in (@value)";strign city ="'NewDelhi','Bangalore','Mumbai'";I'm using following code to achive thisDataSet ds = new DataSet();SqlConnection con = new SqlConnection("Server=localhost;....");SqlCommand cmd = new SqlCommand();cmd.CommandText =query;SqlParameter param = cmd.Parameters.Add("@value",SqlDbType.VarChar);param.Value = city;SqlDataAdapter dap = new SqlDataAdapter();dap.SelectCommand = cmd;dap.Fill(ds);But this is not giving the result.If run the query in SQLServer query window as "Select * from employee where employee_city in ('NewDelhi','Bangalore','Mumbai')", records are there.But the same query will not return any records from ADO.Net.How to solve this?Thanks,Ashokan

Any way to pass Multiple Values for a single Label in the Parameter?

  
  I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610" One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter.  PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data. Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610. QUESTION: Any way to pass Multiple Values for a single Label in the Parameter? I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting it correct. I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….   Note: We are using Report Builder 3.0  

Entity Framework: No support for server-generated keys and server-generated values

  
HelloI tried the Beta 1 of the service pack 1 to .net 3.5. If I try to add an entity (and try to save this), I get the Exception "No support for server-generated keys and server-generated values".How can I add entities to my Sqlce- database?I tried to give the id- column (primary key) in the database an identity, another time without identity, only primary key --> none of them worked. I always get the same error.What do I have to change to make successfully a SaveChanges()?Thanks for your help,Gerald

Can we pass dimension values as parameters in MDX

  

Hi All,

I am doing something similar to basket analysis and I wrote an MDX to see the trend of purchases over time for a customer. How can I dynamically pass values of customer or product purchased into mdx? In below example how can I change [product].[category] value? Also, can we change the dimension also dynamically?

 

with member measures.x as

People Picker control used in ASP.Net wizard control. Loses values on Postback?

  

I am using a people picker control in a custom visual web part with Visual Studio 2010, Sharepoint 2010.

The people picker control is on an asp.net wizard control.

On the wizard step with the people picker control, after postback the people picker control has selected values.

But when clicking the next or previous buttons of the wizard control, the people picker control does not retain its selected values.

 

Microsoft.SharePoint.WebControls.PeopleEditor pe

pe.AllowTypeIn = true;
pe.AutoPostBack = true;
pe.AllowEmpty = true;
pe.MultiSelect = false;
pe.SharePointGroup = "My SP Group Name";
pe.SelectionSet = "SPGroup";
pe.ValidatorEnabled = true;
pe.CommaSeparatedAccounts = pe.CommaSeparatedAccounts;

Any suggestions?

 


Default Values in ADO Entity Framework (GetDate())

  

I have a sql server table with a date column that has a default value of GetDate()

this default does not seem to get passed to the EF and so i was wondering what the most elegant way was to code this default value within my asp.net application? I dont want to manually alter the EF Model as i may want to re-import it and dont want to lose these changes.

any suggestions gratefully appreciated

 

john


people picker pulling old values sharepoint

  

Issue:

 

I have my people picker to pull values from my AD as well as my SQL form authentication database. HOWEVER.. if i delete or add a user its A. not reflecting the new user right away and B. it is showing old deleted users. Is there a way to "Clear the cache"? or remove these old users from showing up?

 

Thanks in advance.


Steve Kopp

Pass Checkboxlist control multiple selected values to SQL table

  

Hi,

I wanted to know if it is possible to pass multiple selected values from Checkboxlist to SQL table so each selections goes into separate row in the table.

I tried it using the following code (to pass ShowDate value) but it enters value only if I make one selection. It gives me an error message if I make two selections and try to pass it to SQL.

 

string showdate = string.Empty;

foreach (ListItem li in BirmShowDates.Items)
        {
            if (li.Selected)
            {
                showdate += li.Value;
            }
        }

            
            conn.Open();

            string sql = "INSERT INTO [BShow] ([Single], [UserId], [ShowDate], [Half]) VALUES (@Single, @UserId, @ShowDate, @Half) SELECT [Single], [UserId],  [ShowDate], [Half] FROM [BShow] WHERE [BShow].[ShowDate] = [BShow].[ShowDate]";

            SqlCommand cmd = new SqlCommand(sql, conn);

cmd.Parameters.AddWithValue("@ShowDate", showdate.ToString());

 cmd.ExecuteNonQuery();
 conn.Close();

Thank you.


Is it possible to pass an array of values, or a custom type as a parameter?

  

I am using a web service as a datasource.  When I create my report I would like to pass
a string array to this web method to retrieve the data for the report.  Is this possible or is there
a similar way to do this such as passing a custom type?

 

thanks,

buckaroov

 


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend