C# - Avoid Query String That Appears In The Address Bar?
Dec 11, 2010
I have applied a filter on a page using drop downs.
When i click on apply filter.. the page gets filtered. Now i click on the edit of filtered result.. which redirects me to another page.
I want to send the selected data from the drop downs from the filter page to the redirected page.. and again to the filter page.. to retain the filter. I am doing all this by sending the values in Query string.
Is there anyway.. i can avoid the visibility of the query string in the address bar and still get the values and required result.
I have a java application that send to a aspx page the user name and password in a Query String. How can I authenticate the user in this aspx web page, and how can I avoid that a user copy the link in the internet explore and acces to the page.
we have made a httphandler and then compiled it and have added its refrence to my project in VS.NETWhen we start VS.NET the referd extention to then above handler works currectly but at the time that we run the same project in IIS 6 (without running VS.NET)and we write the referd extention to the handler in the address bar , an Error 404 appears.Exp. http://mywebsite/default.ttttttttif .tttttttt is the referd extention.
I then check whether one of the result values is more recent than six months ago using an if..then like so:
If rhcexists.First.SignatureDate > Date.Today.AddMonths(-6) Then End If
However, if there are no results returned this will return an error. Is there a way for me to tell it to act as if the date is older than six months if there is no value at all? e.g., could I in pseudo do something like:
If Exists(rhcexists.First.SignatureDate, Date.Today.AddMonths(-8)) > Date.Today.AddMonths(-6) Then End If
I can't seem to figure out how to write this query properly. I've tried various combinations but nothing's worked yet. Below is the relevant portion of my database model: I need to select the products that match a given Category and Group, and that match a given Year, Make, Model, submodel. This I've done below:
ItemList = From P In gDataContext.Products.Include("Groups").Include("Groups.Category1").Include("LookupYearMakeModels") From G In P.Groups Where G.Category = Cat And G.Grp = Group From Y In P.LookupYearMakeModels Where Y.Year = YMM.Year And Y.Make = YMM.Make And Y.Model = YMM.Model And Y.Submodel = YMM.Submodel Select P
I now also have to select products that match the Category, and Group but are Universal (Product.Univeral = True). I'm currently writing two queries, the one above and the one below. I'm merging the results of the two by simply using ItemList.AddRange(ItemList2) ItemList2 = From P In gDataContext.Products.Include("Groups").Include("Groups.Category1") where P.Universal From G In P.Groups Where G.Category = Cat And G.Grp = Group Select P But I want to combine both queries into one and avoid merging the results. How can I do it?
I have a Dictionary<string, bool> where key - control's ID and value - it's visible status to set:
var dic = new Dictionary<string, bool> { { "rowFoo", true}, { "rowBar", false }, ... };
Some of controls can be null, i.e. dic.ToDictionary(k => this.FindControl(k), v => v) will not work because key can't be null. I can do next:
dic .Where(p => this.FindControl(p.Key) != null) .ForEach(p => this.FindControl(p.Key).Visible = p.Value); // my own extension method
but this will call FindControl() twice for each key. How to avoid double search and select only those keys for which appropriate control exists? Something like:
var c= FindControl(p.Key); if (c!= null) return c; but using LINQ.
i have my own DLL (for the data access layer),,i use escaping characters technique to avoid the user input errors ,, but recently i decided to enhance my classes and using parametrized query to prevent all possible errors,Is the modification will be easy or difficult ??how to convert this way to use the parametrized query ..
We are sending an HTML encoded string in the Query string. It was working fine on IIS 6 (windows 2003). We have recently moved the website to Windows 2008 (IIS 7.x). Since the move any Query String that contains "+" sign i.e., "%2b" gives error on the server "404 -File or directory not found."
I search the eror But I found nothing. My Mail setting is well form. Is there any idea what couse of this exception?Mail Configuration
<add key="SMTPFrom" value="mailer@mycompany.com" /> <add key="SMTPReplyTo" value="mailer@mycompany.com"/> <add key="SMTPCredentialUserName" value="company_mailer_system"/> <add key="SMTPCredentialPassword" value="password"/> <add key="SMTPHost" value="hostUrl" /> I add some mailaddress myMail.To.Add(to) and to contains mail addresses splited by ;
If I complete the email and message fields but not the name, I get an onscreen error message in red - that's fine. But if I leave the @ out of the email address I get this:
The specified string is not in the form required for an e-mail address.
Stack Trace:
[FormatException: The specified string is not in the form required for an e-mail address.] System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index) +1560321 System.Net.Mail.MailAddressParser.ParseDomain(String data, Int32& index) +131 System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index) +99
[Code] ....
There is no error message on screen. For each field, I have the following (stripped) in my contact.aspx form:
Code:
<asp:TextBox ID="your_name" runat="server" required></asp:TextBox></p> <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator1" runat="server" controlToValidate="your_name" ErrorMessage="Please complete the Name field"></asp:RequiredFieldValidator>
I wanted to create a URL like http://localhost/menu.aspx/?id so that on typing this, it displays all the id's in the database. for eg:134
123
543
234
may be the id's which should be displayed after fetching from the database. However, it should be displayed as it it is without any control or without arranging in any gird etc. How can that be done?
Well I'm not familiar with SP's yet, and I can't find a single example of what I want to do. basically I want to retrieve the town & county where the customers id are equal (note there will only ever be 1 result)
I can't figure out how to address the results to be stored within the output variables.
That works - but I see employees that are checked to not be part of the global address list in exchange and I want to filter them here also - so I changed the query to this and it doesn't work:
I have a large(ish) text-box on my page that needs to hold a website URL. The text-box is reasonably wide however most URLs will not fit in on a single line. I want the website address to wrap a single line like this:
[URL]
However what my textbox is doing is this:
[URL]
Does anyone know how to automatically wrap a string that does not contain line feeds / white space? (Yes - Wrap is set to true!)
I'm receiving the following error and can't figure out how to fix it:
The specified string is not in the form required for an e-mail address.
It is only happening as soon as I change the message.From to a textbox rather than a static email address. I have pasted the relevant code below:
[Code]....
I did not post the whole block of code but why is this happening when I change the message.From to emailTextBox.Text instead of a static value? And yes I do have valid email addresses in web.config and code.
In IE 7, I can right click on my page and select properties and (usually) see the query string that was passed to that page.
How do I see this in FireFox? I am having a bug where I should be passing consecutive numbers in the query string, such as deal_ik=1,2,3,4,5 etc but 5 is missing. So I want to examine the query string that is actually getting passed.