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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Need to Change a Query String in a DataSet

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
I need help in pointing me in the right direction...   I have a microsoft Report (ViewDelete.rdlc) that is feeding from a DataSet(ViewDeleteDataSet.xsd). A Web Form has been created with 3 Textboxes: -Search by VehicleNr -Search By VIN -Search By TagNr The Same Web Form as Microsoft ReportViewer loading the above mentioned report.   What Needs to Happen: 1. User entered search information into one of the textboxes and clicks Search 2. Query string for the Report is updated to list only the information the user is wanting to see and reloads the report based on this query.   I have been searching for about 4 hours with no luck on how to do this.  I maybe way off on how this should work, can someone help get me going?

View Complete Post

More Related Resource Links

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

How to send an email with information in query string


First I will say I googled (Binged to make Bill happy) for this but could not find anything, perhaps I am not stating what I need correctly;

I have a website that a customer creates orders (for a printing company) and after the order, I would like to email the customer a link to view the status of their order;

I need to send the CustomerID in the link so on the returning page if a CustomerID is detected in the querystring, I "auto login" the client and open the "Dashboard" for the order page for that customer.

Can anyone point me in the right direction as to how to send the link and how to parse the querystring to get the values from the link;

Thank you if you can point me in the right direction.

Getting URL without Query String

Is there an easy way to get the URL portion without the query string of a given URL?

E.g. http://www.abc.com/?a=b&c=d --> http://www.abc.com/

adding parameter to query string


hi all,

how do i add a new parameter to an existing query string?


now i need to add a new parameter say, showsearch.

query string or session variable or neither for this scenario?

Hello,example scenario: user login has a list of associated 'accounts' it has access to... this list of accounts is stored in a database table, say tblAccountAccessControl, something like:login, accountID-----------------------userA, account123userA, account456userA, account798userB, accountABCuserB, accountDEFetc..this info is used throughout the web application and determines the 'domain' of information the particular login has access to. For example there are many other tables that have the 'accountID' field and whenever a page pulls data from the table it only pulls data that the currently logged in user should be allowed to see, based on that tblAccountAccessControl data.the security question:1) do I need to query the database every time I need to get this list of allowed accountID's? I was about to use a plain old query string to pass a particular accountID to another page but quickly caught myself as I realized that would be a major security flaw (the receiving page was going to use that accountID to grab info from the database, and there would be nothing preventing a user from simply typing in a url manually to get data from an accountID they are not supposed to be allowed to view). So I then thought I'll just store the list of accountID's in a session state variable so they will be carried with the user throughout the sessi

I want to encrypt the query string appearing in the URL

I want to encrypt the query string appearing in the URL when pass to other page. For Example: I have a Hyperlink column in GridView  when I click on the link, I pass a parameter to another page. This parameter should not be displayed in the URL as a true value but encrypted. Any help will be most appreciated.  If possible, please provide example. Thank you.  

Parameter Help in my Dataset query

I have a qurey in a data set in reporting services. What im trying to do is use the shipdateyear field as a parameter but i keep getting an error when im running it. I think its because how im getting the name shipdate year its coming from a field where im formatting the data to just show year.heres my query. its erroring in the where Clause i believe. any help would be awesome.   I have underlinded where i think my isues are.  Thanks.select bol.loadnumber, bol.ldhshipdate,bol.shiptocode,bol.destination,bol.shiptoname,bol.itemdesc,bol.abbrev,Datepart(week,bol.ldhshipdate) as 'weeknum',Datepart(weekday,bol.ldhshipdate) as 'weekdaynum',--case statement--Case when Datepart(weekday,bol.ldhshipdate) = 1 then 'Sunday'else case when Datepart(weekday,bol.ldhshipdate) = 2 then 'monday'else case when Datepart(weekday,bol.ldhshipdate) = 3 then 'tuesday'else case when Datepart(weekday,bol.ldhshipdate) = 4 then 'wednesday'else case when Datepart(weekday,bol.ldhshipdate) = 5 then 'thursday'else case when Datepart(weekday,bol.ldhshipdate) = 6 then 'Friday'else case when Datepart(weekday,bol.ldhshipdate) = 7 then 'saturday'else 'none'end end endendendendend as 'dayofweek',--case statement--ofstm.ostabr, ofstm.ostnam,ofstm.ostccd,Datepart(year,bol.ldhshipdate) as shipdateyear,--caseCase when d

Pass XSL "Currently Selected" Value via Query String

Hi, I have a DVWP with an ID column, that's connected to other webparts on the page to filter their values accordingly.   I also have a "Print" button that opens a custom ASP page that's essentially a print-friendly single item data view.  How do I pass the "selected item" value to the URL when a user hits the print button? I've already set up the "ID" parameter and filters on the target page, just need to know how to get the value info from the list ID field inserted into the URL upon button click.  Thanks in advance

Duplicate URLs in Source Parameter of Query String for All SharePoint Lists

After performing a database attach method of upgrading our existing web application from MOSS 2007 to SharePoint Server 2010, all of our lists that migrated now exhibit an interesting but undesirable behavior.  The DispForm.aspx and EditForm.aspx pages that get loaded are given the Source parameter of the query string but instead of the URL being a single entry like: Source=http://sharepointsite.domain.com/Pages/Default.aspx It winds up putting the URL twice like this: Source=http://sharepointsite.domain.com/Pages/Default.aspx,http://sharepointsite.domain.com/Pages/Default.aspx Naturally this makes processing of the form -- either by choosing OK or Cancel buttons -- result in an HTTP 404 error.  The question we're left with is how in the world did the Source parameter get set that way to begin with.   It wasn't that way in 2007. We had thought that perhaps there was something that didn't migrate over correctly for the existing lists, so I tried creating a new list and then added a new item to the list.  So far so good.  Then attempted to Edit Properties or Edit Item or even View Item, etc. -- essentially triggering the load of the EditForm.aspx and DispForm.aspx  -- and we received the 404 again.  At this point we're not sure what's going on or how to fix it.  We've performed the migration three times so far with t

How to change connection string of a pivot table pointing to SSAS 2005 cube using excel 2003?

Hi All,I am not sure if I should have posted this query to Excel 2003 forum. But posting it here as it applies to SSAS 2005 as well.Ok, let me give the background before I tell the actual problem.We have users on ABC domain and the SSAS server is also on ABC domain. Users on this domain can acess the excel pivots by connecting to cube to browse the data. They leave the Userid & password field blank while they setup the connection string and it works fine. Thanks to windows authentication that takes the credentials of user logged in. Let's say I have two users A and B, they login to ABC domain with their own windows ids.  Now when user A creates a excel file having a cube pivot and then sends this file to user B, user B can refresh and modify the same excel file (he can select new measures to pivot, new hierarchies in filters and so on).Now, let's say I have another user, user C. He has excel 2003 installed on his PC and cannot migrate to excel 2007. He is on different domain XYZ but have a valid windows userid on domain ABC. The domain ABC & XYZ can not be setup to have trusted relationship. Now, when user A sends the same excel file to user C. When user C opens the file and try to refresh it or try to modify the pivot by selecting/deselecting any elements, he gets below error prompt:" An error was encountered in the transport layer." and "Errors in the

Change Sqldatasource or LINQ to SQL into a DataSet? [C#]

Hi Everyone,I've saw a couple of threads on here and on different sites around this area but none I've tried have seemed to work.What I'm struggling to achieve is, I want to take a set of results attained by either a SqlDataSource or a LINQ to SQL Method and feed them into a DataSet. Why? This is because I have downloaded an example of a repeater which has paging programmed on it, but in the example it uses the DataSet.ReadXML method to read a pre-defined set of results in an XML file. As my results are constantly changing I thought it would be a good idea for the DataSet to attain them from the previous mentioned ways.I've lost count at the number of ways I've tried it, from setting up SQLConnection method seperately and the QS set as a 'string' then passing that through etc. to simply trying Dataset Items = PartialClass.GetAll(); - Which throws back Generic<List> cannot be converted to DataSet - or something close to that.I'm working from an example and incorporating it into my own project.Below is the code I'm trying to get working:C#:protected void Page_Load(object sender, EventArgs e) { // Call the ItemsGet method to populate control, // passing in the sample data. ItemsGet(); } public void ItemsGet() { // Read sample item info from XML document into a DataSet DataSe

Need Help in HyperLink with query string

Dear All,         I am using a hyperlink which Navigation Url is like                                                                     Indus.aspx?Ind="+indName+"&Value="+val  The indus page is not getting reloaded (There is one grid, whose rebind is not happening) and even i tried debugging. But it seems not entering the page. So i want to trigger a page load in query string . thats my only catch in this issue. are there any thing which cud be appended at the end of the above link to trigger a page reload? Please give your suggestion people.   Thanks in advance, Parthiban S.

How to filter managed meta data column using page query string?

I have two managed term sets as follows: Articles:Downloads Projects:Downloads I am trying to use a content query web part to filter a list based on the above manged meta data column. I want to filter out only "Articles:Downloads" Scenario 1: When I edit the web part and directly set the filter option with the managed meta data column to "Articles:Downloads" it works fine. When I export the web part, in the .webpart file, the "FilterValue1" property has a value "Downloads|9096e43b-555d-4879-9acc-b4ada9ea9910". Scenario 2: I want the web part to get the filter information from query string [PageQueryString:pageType]. So I tried using these options: a) pageType=Downloads      This works but returns downloads under 'projects' as well. (i want downloads only under 'articles')  b) pageType=Articles:Downloads     Does not work and shows no records c) pageType = Downloads|9096e43b-555d-4879-9acc-b4ada9ea9910     Does not work. (This value is the same as one found in 'FilterValue1' of the static web part). c) pageType = Articles:Downloads|9096e43b-555d-4879-9acc-b4ada9ea9910     Does not work. d) pageType = 9096e43b-555d-4879-9acc-b4ada9ea9910     Does not work.   What am I missing here? Can some one please help?

xml nodes query on DataContractSerializer string

Hi I need to get a table from this xml, I have some experience using nodes but am getting nowhere on this string.  It is produced from DataContractSerializer on a list with one of the columns a dictionary.  Any help will be much appreciated!  declare @xml xml = ' <ArrayOfArmorDeviceBase xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://server.armor.com/contract/data">   <ArmorDeviceBase xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" z:Id="i1" i:type="ArmorSimpleDevice">     <Id>5000</Id>     <SiteId>0</SiteId>     <SourceSystem>Armor</SourceSystem>     <DataGroups xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">       <d3p1:KeyValueOfstringDeviceDataGroupBaseRRFhSxY9>         <d3p1:Key>CommunicationStatus</d3p1:Key>         <d3p1:Value xmlns:d5p1="http://server.armor.com/contract/data/ControllerStatus" i:type="d5p1:CommunicationStatus">           <Ticks>0</Ticks>           <d5p1:Status>Disco

Change connection string of Linq to Sql entities

Hi all.I have a solution which uses Linq to SQL Data Classes to acced the db. I have a project for my domain objects in my solution, which is a class library and has the dbml file. When I set up the dmbl using the wizard, Visual Studio created an app.config file on that project with the connection string. It also creatting a settings file with the same info. I've noticed that if I change the connection string in the settings file, the app.config gets updated, which is the expected behaviour.However, I'm having a problem when I deploy my web site to the production server. I already set the app.config file's Build Action to "Content", and also set Copy to ouput directory to "Always". Nevertheless, when I install the web site and change the connection string in the app.config file, it still takes the old connection string, so obviously I get an error. I've found that it only works if I change it with in Visual Studio and then compile, but of course that's not an optimal solution, because any change in the production db server would mean I have to change my project's assembly, thus generating a new version.Any thing I'm missing? What do I have to configure so that the assembly takes the connection string form my app.config file directly after I deploy?Thanks a lot.

Need to convert query string(date - 09/15/2010) to a text format - yyyymmdd

I am fairly new to C # and need some assistance with a form page.  I have created a simple form that requires the user to select a beginning date and ending date.  I then pass the values to my code behind page via query strings.  I have them passing, but I need the format to be change to a different format.  Unfortunately the database does not use the standard date format.  It requires the date to be in a text format as YYYYMMDD.Form: <tr> <td> Beginning Date:</td> <td><asp:TextBox runat="server" ID="begDate"></asp:TextBox> <asp:Image ID="Image2" ImageUrl="~/images/calendar_schedulehs.png" runat="server" /></td> </tr> Code Behind: protected void createReport_Click(object sender, EventArgs e) { StringBuilder url = new StringBuilder("Report/TopCustomer.aspx?"); url.Append("BegDate=" + begDate.Text); url.Append("&EndDate=" + endDate.Text); url.Append("&Brnch=" + ddlLocation.SelectedValue); Response.Redirect(url.ToString()); Current URL: TopCustomer.aspx?BegDate=09/15/2010&EndDate=09/30/2010&Brnch=300I need to have the above URL change to:TopCustomer.aspx?BegDate=20100915&E

How to apply dynamic filter in Datasheet View from Query String

The datasheet view doesn't support either connections/dynamic filters from Query string. How to filter the data using query string?
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