|
When I was trying to do session varibles, I found a hard time finding decent code to mimmick, or someone being ablt to explain it correctly to me, so here is a some code sniplets, from one of my pages, I pass about 4 session varibles, to another page, depending on how a user answers some questions of my form, them I call this function to pass certain pieces of data to the form I pop open for them
This is what function I call to start passing my session varibles, and pop open the window
private void EnterTIR( string myMSEL, int myPTNumber, int myEntryOrder, int myPTSUBNr, int strmyMSELNum)<br />
{<br />
Session["sMSEL"] = myMSEL.ToString();<br />
Session["sPTNumber"] = myPTNumber.ToString();<br />
Session["sEntryOrder"] = myEntryOrder.ToString();<br />
Session["sPTSUBNr"] = myPTSUBNr.ToString();<br />
Session["sMSELID"] = strmyMSELNum.ToString();<br />
<br />
string url = "../Forms/NewTir.aspx?sessionId="+Session["sMSEL"]+Session["sMSELID"]+Session["sPTNumber"]+Session["sPTSUBNr"]+Session["sEntryOrder"];<br />
<br />
string windowName = "NewTir";<br />
string openParams = "width=700,height=800,toolbar=1,resizable=1";<br />
StringBuilder sb = new StringBuilder();<br />
sb.Append("<script language=\"javascript\" type=\"text/javascript\">" + Environment.NewLine);<br />
sb.Append("window.open('" + url + "', '" + windowName + "','" + openParams + "');");<br />
sb.Append("</script>");<br />
<br />
Page.RegisterStartupScript("openWindowScript", sb.ToString()); <br />
<br />
<br />
<br />
}<br />
Then on page load of the NewTIR.ASPX
MSEL.Text = Convert.ToString(Session["sMSEL"]);<br />
Entry_Order.Text = Convert.ToString(Session["sEntryOrder"]);<br />
PTNumber.Text = Convert.ToString(Session["sPTNumber"]);<br />
PTSUBNr.Text = Convert.ToString(Session["sPTSUBNr"]);<br />
MSELID.Text = Convert.ToString(Session["sMSELID"]); <br />
Hope this helps, But be aware, session vars are known to slow your site down a bit, if you start passing too many. In my case this is the only time I use any session vars.
|
|
|
|
|
thank you very much. It's work excellent.
|
|
|
|
|
Glad I could help someone on here. I noticed alot of questions go un answered, so I try to answer what I can!
|
|
|
|
|
Hello Technicians
I m using IIS5.1,VS2003,WinXP SP2
Whenever i m trying to create or use a web application,it gives me the error
"The web server reported the following error when trying to create or open the web project located at following URL http://localhost/cf".'A connection with the server could not be established.'
when i restart IIS it does,nt give any error message to me neither it shows any information about successful starting of internet service.
If i stop IIS it tell me to chk for the web server installed and running.
and restart then the same error "Connection could not be established"
I have searched a lot of forum but unfortunately can not fix it.
plz do something.....
Ajay
|
|
|
|
|
If i understand you correctly, you expect your localhost to work even if IIS is stopped?
To my knowledge i do not think you can run a localhost site if IIS is stopped.
Please correct me if I am wrong...
|
|
|
|
|
I have been out of ASP.NET web programming for about 2 years now. I am now using visual studio 2005 to deploy the MS small business sample asp.net (vb) sample website. I have tried to publish to my ftp site and also used the copy web option in VS2005, but when I go to the URL via IE, it attempts to download the page (I get the open/save dialog box) instead of displaying the page. Not sure what I am doing wrong or if it has something to do with the hosting site I am using. When I debug the web site on my local computer, the pages work fine.
Any assistance or direction would be appreciated.
Thanks
Marc
|
|
|
|
|
this normally means that the mime type of the page is configured wrong on the server so your browser doesn't know what to do with it. I've been out of the server game for a while so i'm not sure how you fix it these days but hopefully that's enough to start googling on.
HTH
Russ
|
|
|
|
|
I want to develop an asp .net web page that allows a user to upload an eps file to the web server and than convert the eps file to a jpg or gif file. I can code the uploading of the file but how can I do the converting?
|
|
|
|
|
Try with ReaConverter Pro - Advanced Image Converter.
Regards,
Satips.
|
|
|
|
|
Hi,
Im having a problem with my application,when im trying to execute a exe file from my ASP.NET application im getting the following error.im executing the file using the PROCESS class in .NET.
This Exe is executing correctly from the command line and in a prototype application.
HERE IS THE DETAILED ERROR MESSAGE.
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'TF, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.
File name: 'TF, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' --->
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Any Helps greatly appreciated
Sudharson.G
|
|
|
|
|
Can U please provide the code?
Regards,
Arun Kumar.A
|
|
|
|
|
This normally means that the security has been locked down so that you can't fire things off.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi friends
how to create rating system in asp.net,c#.net
regards
saravanan
|
|
|
|
|
The Five Star Rating System means look at the article in CP Rating System[^] By Andrey Butov.
This will help you to create the rating System.
Regards,
Satips.
|
|
|
|
|
|
In my grid view I want to show only date but it is showing date and time.
How can I show Date only
|
|
|
|
|
Check for DataFormatString property in your Columns.
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
Thank you can you tell me how should I give inside the property column.
I had given like this{dd/mmm/yyyy} but it is showing eror(input string is not in correct format).
|
|
|
|
|
U can do this in query it self, use this:
SELECT Convert(nvarchar(11), Ur Date , 13) AS DateOnly
From Table.
Hope this helps u....
|
|
|
|
|
hi,
you can use split function, then it will solve.
thanks
|
|
|
|
|
A kamath wrote: I had given like this{dd/mmm/yyyy} but it is showing eror(input string is not in correct format).
give it as {dd/mm/yyyy} then it will not show Error.
Regards,
Satips.
|
|
|
|
|
|
Paste your code here we will check it out.
Regards,
Satips.
|
|
|
|
|
<asp:boundfield datafield="RECIEVEDDATE" headertext="RECIEVEDDATE" sortexpression="RECIEVEDDATE" dataformatstring="{dd/mm/yyyy}">
|
|
|
|
|
Regards,
Satips.
|
|
|
|