|
|
I want to change my session variable to a query string but not finding a lot of info on actually how to program them.
On page 1 of my asp.net application the user enters a part number in a textbox. So I have:
strPartNumberInputReference = txtSearchPart.Text;<br />
Session["ptNum"] = strPartNumberInputReference;
On subsequent pages I call:
partNumber2 = Session["ptNum"].ToString();
So if I want to use a query string do I just change the first page to:
strPartNumberInputReference = txtSearchPart.Text;<br />
strPartNumberInputReference = Request.QueryString["strPartNumberInputReference"]
So 2 questions:
1. Am I writing the above correctly?
2. How do I call in subsuquent pages?
Thanks!
|
|
|
|
|
No.
<br />
strPartNumberInputReference = txtSearchPart.Text;<br />
<br />
response.Redirect(url & "?strPartNumberInputReference=" & strPartNumberInputReference )<br />
|
|
|
|
|
So how do I use it in subsequent pages?
Do I just declare strPartNumberInputReference again or do I use:
strPartNumberInputReference = Request.QueryString["strPartNumberInputReference"];
Thanks for your help!
|
|
|
|
|
Option 2. Web pages are stateless by default, so you are just passing your parameter, as a string in the url, that is all. It's very different from the way that session works.
|
|
|
|
|
Okay, trying to do the response redirect:
Response.Redirect ("...Pages/Add_Weight.aspx" & "?strPartNumberInputReference=" & strPartNumberInputReference );
Getting a compiler error: "Operator '&' cannot be applied to operands of type 'string' and 'string'
What am I doing wrong?
|
|
|
|
|
<br />
Response.Redirect ("...Pages/Add_Weight.aspx"?strPartNumberInputReference=" + strPartNumberInputReference );<br />
|
|
|
|
|
|
Okay, there are only three quotations in your code. Still getting compiler error. Tried as you wrote and said ; and ) expected. Tried the following:
Response.Redirect ("...Pages/Add_Weight.aspx"?strPartNumberInputReference=" + strPartNumberInputReference" ); and got ) expected.
Am I missing parenthesis or is it the quotes?
THANK YOU!
Okay, got it to work with the following:
Response.Redirect ("Add_Weight.aspx?strPartNumberInputReference=" + strPartNumberInputReference);
Had an extra quotation. Hopefully I won't have any more problems!
-- modified at 14:15 Monday 10th July, 2006
|
|
|
|
|
I have a component art grid inside user control. how do i set the vertical and horizontal scrolling if it can exceed the page size. Allowhorizontalscrooling and scroolbar="auto" property not works in that
can any one please help me
thanks
mahesh
|
|
|
|
|
i created an application that streams from a server but my problem is on my server there quiet a few drives for eg drive m,u,f,g,h right and lets say my ip for my server is 123.34.0.1 for arguements sake right
1. i have some audio on the u drive and i want to retrieve it how would i do this???
i tried http://123.34.0.1/recordings/ken.wav................i tried that since the ken.wav is located on u:/recordings/ken.wav
kenny
|
|
|
|
|
You have to set up a virtual directory in IIS for u:/recordings/
|
|
|
|
|
how would i do this???? canu tell me wat to do or point me to a tutorial as to how to do that
kenny
|
|
|
|
|
Well I hoped on over to www.google.com and typed in "virtual directory iis" and one of the links it returned (on the very first page) is this:
http://msdn2.microsoft.com/en-us/library/zwk103ab.aspx
Sometimes, the more you try to help yourself the better you get at finding your own answers so that you don't have to depend on other people. Someone else and myself both told you the answer (use virtual directories) and all it took was a quick google search to get the information you needed. Instead you sat and waited for me to go to lunch, eat my food, come back in, do the google search, and post it.
|
|
|
|
|
thanks i kne whow to create virtual directories when for example u copied a poject to anotherpc and u had to recreate the virtual directory but i never know u could do that for jus folder locations so i thought uguys were taking bout soemthing else thats why i waited, sorry about that
kenny
|
|
|
|
|
As you are using the http protocol to stream the data, the file has to be visible through the web server. Make a virtual folder that points to the folder that contains the files that you want to make available.
---
b { font-weight: normal; }
|
|
|
|
|
can u tellmr how to do this please, or point to soemwhere i can read how to do this
kenny
|
|
|
|
|
Open the IIS console and right click where you want the virtual folder. Select to create one and enter the path of the folder to use.
---
b { font-weight: normal; }
|
|
|
|
|
when the application times out and closes it writes the record or partial record to SQL. Records should only be written when they are saved, not on a time out.
this code is written by my client.pls let me know asap
|
|
|
|
|
Get with the client and have them change their code.
|
|
|
|
|
i download small atlas related example from codeproject and test the application in many browser like IE,Opera,FireFox,Netscape but it works well with IE and Opera but FireFox and Netscape do not support atlas i found.
so i could work with atlas as a result my code will work well in all the browser.pls help in detail.
tbhattacharjee
|
|
|
|
|
ATLAS includes Compat.js, which should sort out all the CB issues - and in fact, Netscrape will allow you to render using the IE control.
What do you mean by they don't support Atlas - all it consists of is a dll and some javascript - you do have JS enabled in the browsers don't you?
If it really is a problem, then just code up the ajax bits yourself - piece of cake!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi,
How to extract the URL from an Internet Shortcut (.url) file in ASP.NET/C#?
What are the namespaces and classes required to read the information from a ".URL" file?
Thanks in advance.
Subrahmanyam K
|
|
|
|
|
I can recommend you 2 things.
First the really hard way :P
http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp[^]
Second, you can open the file and get all the content of the url file. Like this :
<br />
using (FileStream fs = File.OpenRead(filename))<br />
{<br />
byte[] b = new byte[1024];<br />
UTF8Encoding temp = new UTF8Encoding(true);<br />
while (fs.Read(b, 0, b.Length) > 0)<br />
{<br />
string content = temp.GetString(b);<br />
}<br />
}<br />
Then you will probably be able to get it with a regular expression.
My Blog
-- modified at 9:55 Monday 10th July, 2006
|
|
|
|
|
hi all,
have a composite control that is all but finished, but when i change properties for it they are not applied until i switch from design to code to design view.
i have tried amny things but i cannot get the design view to render the changes immediately.
same goes when changing properties from the smart tag.
what is the secret to this ?
kind regards,
g00fy
|
|
|
|