|
This article from Microsoft has a good summary: http://msdn.microsoft.com/en-us/library/aa479314.aspx[^]
If your the users using your web application have cookies disabled in their browser then you can use CookieLess sessions. The session ID gets encrypted and put into the query string instead of into a cookie. Your code does not need to change at all, unless you were trying to use cookies.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
You're welcome.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
This is more an HTML question than ASP.NET, but since there's no HTML forum (and the answers I've gotten from google are not helpful) here goes:
I see this a lot (example from Foundation):
<nav class="top-bar" data-topbar</nav>
data-topbar is invalid XML because it has no value (no ='' )
Is this some bizarre shortcut that only HTML understands? What if I assign a value like an empty string?
I see this frequently in javascript libraries, it's not something exclusive to Foundation.
Thoughts?
Marc
|
|
|
|
|
Aren't you missing a closing > after data-topbar?
|
|
|
|
|
HTML != XML (unless you're using XHTML, which was popular for a while).
What you're looking at is a boolean attribute:
Some attributes play the role of boolean variables (e.g., the selected attribute for the OPTION element). Their appearance in the start tag of an element implies that the value of the attribute is "true". Their absence implies a value of "false".
Boolean attributes may legally take a single value: the name of the attribute itself (e.g., selected="selected" ).
In HTML, boolean attributes may appear in minimized form -- the attribute's value appears alone in the element's start tag. Thus, selected may be set by writing:
<OPTION selected>
instead of:
<OPTION selected="selected">
Authors should be aware that many user agents only recognize the minimized form of boolean attributes and not the full form.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: What you're looking at is a boolean attribute:
Thanks! HTML again!
But I appreciate your finding the link for me to explain this interesting format.
Marc
|
|
|
|
|
i m new in asp.net...
plz provide a code or ideas...
that how to create quick answer forum same like in code project...
|
|
|
|
|
Your question was already answered here[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi all,
So my big problem is this, i have a class that creates a PDF directly to a memorystream. Whit this i can download and show a file in browser without doiwnloding it, the main problem is how can i redirect the file to a div, to be showned there.
Thanks
|
|
|
|
|
As far as I know, you can't do that. However, you can put an iframe tag inside the div and link the iframe to the location of the pdf, or in your case the webpage that serves the memorystream. Make sure to set the content type to application/pdf in the response header. The browser will take it from there.
|
|
|
|
|
This is my code
ReportViewer rptvw1 = new ReportViewer();
rptvw1.ProcessingMode = ProcessingMode.Local;
rptvw1.LocalReport.ReportPath = p.Server.MapPath("~/GridReport.rdlc");
BL_Insurance.PrintDetail print = new BL_Insurance.PrintDetail();
DataTable ds = print.Print(Convert.ToInt32(p.Session["transactionid"]), Convert.ToString(p.Session["typeofplan"]), Convert.ToInt32(p.Session["UserID"]));
ReportDataSource datasource = new ReportDataSource("DataSet1", ds);
rptvw1.LocalReport.DataSources.Clear();
rptvw1.LocalReport.DataSources.Add(datasource);
ReportParameter[] param = new ReportParameter[4];
param[0] = new ReportParameter("Company", Convert.ToString(p.Session["insurancecompany"]));
param[1] = new ReportParameter("Policy", Convert.ToString(p.Session["policyname"]));
if (ds.Columns.Contains("Adult"))
{
param[2] = new ReportParameter("Adult", "True");
param[3] = new ReportParameter("Child", "True");
}
else
{
param[2] = new ReportParameter("Adult", "False");
param[3] = new ReportParameter("Child", "False");
}
rptvw1.LocalReport.SetParameters(param);
rptvw1.LocalReport.Refresh();
Warning[] warnings = null;
string[] streamIds = null;
string mimeType = string.Empty;
string encoding = string.Empty;
string extension = string.Empty;
filetype = "PDF";
fname = DateTime.Now.ToString("yyyyMMddHHmmssfff");
byte[] bytes = rptvw1.LocalReport.Render(filetype, null, out mimeType, out encoding, out extension, out streamIds, out warnings);
finally am getting this format as byte array.
I want to print this byte array without saving any format.
Please tell me how to print this byte array directly.
|
|
|
|
|
How multiply two values one from database and one from user and print in another textbox.
|
|
|
|
|
- Read the values
- Parse them to integers or floats
- Multiply them together
- Format the answer to a string
- Put the string into the textbox
BTW, in future please use the correct forum, and explain your problem in better detail.
|
|
|
|
|
Hi All,
I am trying to prebuild and application when I have put the xcopy commands as below, initially it threw error as the specified folder doesn't exist at the target location.
Is there any way to write some intelligent login for the precompile so that when the precompile is happening, if there is no specified directory in the target location, it will create one automatically, if there is it will over write all the directories and files automatically without prompting the user.
Please any kind of help or support is very helpful, any link or suggestion or example would help a lot.
thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Use the /E switch with xcopy. That will copy the directory structure, including empty directories.
xcopy C:\Source\*.* D:\Target\*.* /E
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hi,
I have used the same thing, it successfully does precompile once but then the folder and files are not available already it fails, by throwing error the command xcopy exited with code 2. May be it is unable to replace the existing ones.
Can you please give me option for both situations when there is no folder available and when there is everything available but still replaces with without prompting any message on to the command prompt.
Can you please help me in this regard.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
You can look at all the options available with xcopy by opening a command prompt window and entering "xcopy /?"
But it sounds like your problem is not with xcopy. It sounds like your problem is with some other program that is launching xcopy, is this correct?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hi,
I don't what is causing the problem, these DOS and Windows errors hard to debug. I have used my xcopy with all the below switches. With every switch it is giving me the same error.
Switches:
xcopy "$(SolutionDir)\Core\*.aspx" "$(ProjectDir)\Core\"
/c /y
/e /k /i /c
/c /d /e /h /i /k /q /r /s /x /y
And error is same for all the switches. Any help please any sort of help is appreciated.
Unable to cast object of type 'Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec' to type 'Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec'.
Failed - CopyDirectory to Destination folder failed. Robocopy Error # 16
I am not at all using Robocopy in my application once I used it some time before but now I replaced it with xcopy and above switches. I am not understanding what is the problem. Is it caching up I don't know why is it giving Robocopy error.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I'm sorry but I cannot work out what programs you are using.
That error that you show is not an xcopy error. That's an error from some other program that you haven't disclosed.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
hey guys
I want to create a search function that searches for files with in a folder that matches the text that a textbox holds , how do i got about this
my code below looks for all the files and put it in a gridview but dont know how to make it so that it looks for a match betwwen the textbox and the files within the folder and only displays those
DataTable Dt = new DataTable();
Dt.Columns.Add("File", typeof(string));
Dt.Columns.Add("Size", typeof(string));
Dt.Columns.Add("Dir", typeof(string));
foreach (string filename in Directory.GetFiles(@"C:\files"))
{
FileInfo fileinfo = new FileInfo(filename);
Dt.Rows.Add(fileinfo.Name, fileinfo.Length +"KB", fileinfo.FullName);
}
GridView1.DataSource = Dt;
GridView1.DataBind();
PLease help Thanks
|
|
|
|
|
I believe you can use wildcards with Directory.GetFiles() . So just take the text box content and use it in the call to GetFiles() .
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hi I've an application with an admin section, for example a dropdown list is poopulated with cities but if the user was to delete some records through the UI, verify their actions in the dropdown and then decided they wanted to undo their change. What would be the best way to enable rollback functionality like this?
|
|
|
|
|
Set a boolean field [deleted] for each entity you want to rollback. Instead of actually deleting the records, you can just set deleted=true and then, if you want to rollback, set it to false again.
Of course you need to consider the deleted field in your select queries.
I will never again mention that Dalek Dave was the poster of the One Millionth Lounge Post, nor that it was complete drivel.
How to ask a question
|
|
|
|
|
Hi All,
I have a Web Application called FDP which is in .Net 2.0 and there are other 4 applications which are in classic asp. Now we are planning to convert all these 5 applications in to .Net 4.5. We need to use a common master page for all 5 of them I have already implemented and tested it with static data.
Now the other problem is we have some user controls in FDP we have to use on Master page eventually would be common for all 5 applications going forward. Now the problem is when I reference the ascx file in master page by using the Virtual Path, then as the master page is referenced in other applications as dll, this Virtual Path and ascx file is not available there. And the application is throwing error.
Is there any way to reference ascx file in master page as dll or accessing the ascx file of the master page dll in the other applications. And this ascx file has code to access some database and config values, which have to be coming from those other application.
Is it possible to implement this solution. Please give me some advice or any link which can support me. I am also doing my best for this implementation. Please any type of support if very helpful.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|