|
sheemap wrote: where is the problem Somewhere in your code.
|
|
|
|
|
sheemap wrote: showing
System.Web.UI.WebControls.FileUpload
not path
Whatever way you tried to extract the file path was incorrect. As such, you no more get the full file path, just the myFileUpload.FileName .
This is based on security reasons. Further, once file is uploaded, all you need to worry/know is where is file is uploaded - path of this location. This is defined by you and can be very easily stored in DB along with the filename to access later.
Go through this article to learn on how to do it:
MSDN: Uploading Files in ASP.NET 2.0[^]
MSDN: FileUpload Class[^]
|
|
|
|
|
We maintain our own network, servers and internet connection here at work, because we find the IT services department of our owning company are too slow and bogged down with policy for our needs. Still we still neede to be able to access their network on occasion (e.g. their intranet site). You'd think that would be straightforward - they just need to set our domain as 'trusted', surely with whatever restrictions and sandbagging they deem necessary. However, they aren't willing to countenance that for who knows what reason, so I'm looking for an alternative. Preferably the solution would not involve everyone having two logins - one for our network, and one for theirs. Especially since they expire their passwords more frequently than most people here need to log in to their network.
One approach we thought of would be for our IT guy to maintain a single account on their network we could all share through our intranet (which already uses network login authentication).
Is there anyway to create a link / session that would automatically use a (different) set of network credentials when accessing a given site? Preferably such that a given user doesn't have to know the login details? (i.e., something like USERABC / PSWD1234 logs on to our intranet, then clicks on a link / app / button which uses USERQRS / PSWD7890 to login to their network)
|
|
|
|
|
I need to preselect (highlight) first row on page load event and then on button click event move to the next row. So far I had no sucess, below is my code. What am I miss?
<script type="text/javascript" >
var currentRowId = 0;
function MarkRow(rowId) {
if (document.getElementById(rowId) == null)
return;
if (document.getElementById(currentRowId) != null)
document.getElementById(currentRowId).style.backgroundColor = '#ffffff';
currentRowId = rowId;
document.getElementById(rowId).style.backgroundColor = '#ff0000';
}
function SelectRow() {
if (event.keyCode == 40)
MarkRow(currentRowId + 1);
else if (event.keyCode == 38)
MarkRow(currentRowId - 1);
}
</script>....
<asp:GridView runat="server" ID="GridView1" AtoGenerateColumns="True" >
</asp:GridView>
<asp:Button runat="server" ID="ss" Text="Click Me"/>
PageLoad
With GridView1
.DataSource = myDataSet
.DataBind()
.SelectedIndex = 0
.Focus()
.Rows(0).RowState = DataControlRowState.Selected
End With
Protected Sub GridView1
_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow And ( _
e.Row.RowState = DataControlRowState.Alternate Or e.Row.RowState = DataControlRowState.Normal) Then
e.Row.Attributes.Add("id", ndx.ToString)
e.Row.Attributes.Add("onKeyDown", "SelectRow();")
e.Row.Attributes.Add("onClick", "MarkRow(" + ndx.ToString + ");")
ndx += 1
End If
End Sub
Private Sub ss_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ss.Click
Dim i As Integer = GridView1.SelectedIndex
GridView1.SelectedIndex = i + 1
GridView1.Focus()
End Sub
|
|
|
|
|
hi,
Iam using bellow function to download files but files are not extracting after download .
function zipFilesAndDownload($file_names,$archive_file_name,$file_path)
{
$zip = new ZipArchive();
//create the file and throw the error if unsuccessful
if ($zip->open($archive_file_name, ZIPARCHIVE::CREATE )!==TRUE) {
exit("cannot open <$archive_file_name>\n");
}
//add each files of $file_name array to archive
foreach($file_names as $files)
{
$zip->addFile($file_path.$files,$files);
echo $file_path.$files,$files."<br>";
}
$zip->close();
//then send the headers to foce download the zip file
header("Content-type: application/zip");
header("Content-Disposition: attachment; filename=$archive_file_name");
header("Pragma: no-cache");
header("Expires: 0");
readfile("$archive_file_name");
exit;
}
any one can help to me..
Thank u
-- modified 16-Jul-12 9:37am.
|
|
|
|
|
Hi.
This issue has bothered me for some time now.
I have quite a normal website, with different html files. If I make changes to a file, I can (sometimes!) see the changes when I hit f5. But if the file is fully replaced (same name and extension though), my browser shows the previous cached page.
So I have to manually right click in the frame, and reload it to see the new version of the page.
After many times googling to address this issue, Ive come up with these meta tages in top of each page:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<meta http-equiv='pragma' content='no-cache'>
But little does it help.
The problem is still there. Why? And how to solve it?
I´ve inspected of other sites that updates several times a day. They have have no special meta tags or alike in their html pages. And it´s of course not nescasary to update the page manually.
Is it a server side setting or what figures?
Thanks alot for your time 
|
|
|
|
|
This is not a serverside issue, cache control is arranged by the client. If the client suspects the content to be out of date the browser will sent a head request. The server then replies with status 200 if there is a new version.
To disable caching on the browser you can set the following 2 headers:
<br />
Cache-Control: no-cache, must-revalidate<br />
Expires: Sat, 26 Jul 1997 05:00:00 GMT<br />
This should disable browser cache.
|
|
|
|
|
Alright, so that would be like:
and
Right?
|
|
|
|
|
|
Thanks alot, I´ll give it a try 
|
|
|
|
|
Hi again.
I´ve tried what you suggested, but I has no effect. The problem is the same
Any idea?
|
|
|
|
|
I've written my first jQuery ajax function. It passes a date from the browser to a webmethod in my code-behind. From there the date is verified using a regular expression to make sure someone isn't trying to send something else back. Now, when I tested out this function before with a standard postback, it worked fine. Now, since I'm using ajax I'm getting the message back that my date is invalid, even though I can return it to the screen and it looks just fine.
My question is, how is the string formatted when it is sent from the browser to the code behind using ajax/json? Do I need to parse the date in my code behind?
|
|
|
|
|
You need to explain what framework you're using. In MVC, you can create a function that takes a DateTime of the same name, and the framework just magically parses it for you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Sorry, it was in SharePoint 2010, but I figured it out. Thanks.
|
|
|
|
|
Hi,
I explain my requirement with example.
Suppose GridView bind with 10 records. In each row in gridview have checkbox.Suppose i selected five record (i checked five checkbox).I need to update selected five records in database.
When I update first record I need to show updated Record in other gridview. same way when other record update i need to show updated record in other gridview.
it's urgent.please let me how to do it.
Note:-Update button is outside of gridview.
Thanks
Asif
|
|
|
|
|
This has already been answered here[^]. Please do not post the same question in multiple forums.
|
|
|
|
|
+1 was to add my opinion as in 'ditto', same view.
Vote will be 5!
[This is an answer to a question posted on a deleted article]
|
|
|
|
|
Thanks, my comment was slightly tongue in cheek.
|
|
|
|
|
Need to load a lot of product data to a site that does not accept data feeds. I could manually enter each of my products in a form, submit and continue to product #2, enter form , submit etc... But I'd prefer to find an automated solution...if anyone knows SAP, you do the same thing essentially using something called a BDC program: BATCH DATA CONTROL.
Surely there is something out there to do this. Or an example using perl::LWP e.g.?
any help would be greatly appreciated.
|
|
|
|
|
How can I disable previous button on Wizard1_FinishButtonClick event ?
I was able to find cancel and finish button but not previous
CType(Wizard1.FindControl("FinishNavigationTemplateContainerID").FindControl("FinishButton"), Button)
|
|
|
|
|
hi,
Iam trying to install ffmpeg on wamp server2.1
but i failed to install can any one help to me.
Thank you
|
|
|
|
|
Hi everyone,
I have problem with links on my site (http://troszczynka.pl). I would like to place them permanently on the top of the notebook (just like in the project: http://troszczynka.pl/home.png) and make an animation of rolling out link with jQuery with mouse hover event.
I can manage jQuery by myself but I can't place them exactly on the top of the notebook. I tried to do it but on different screens all the links move into the different places.
|
|
|
|
|
[edited for clarity on July 7]
Let's say I have a web-site someone did, possibly an "amateur," or someone who clearly doesn't grasp what "standards compliant" is, and has created the web-site equivalent of BASIC "spaghetti code."
My goals here are:
1. Make the code standards compliant: but, not to alter the functioning of the site at all.
2. Cross-browser and cross-browser-version display issues: deal with issues of cross-browser display validation, and, possibly, make it display properly on the usual gamut of browsers/versions.
I realize these are two different issues, even though I think it's possible that having fully standards compliant HTML and CSS might make some impact on cross-browser display issues.
Are you using any tools now, paid, free, or, on-line, to help you analyze these issues in, or QA of, revising a site's HTML and CSS ?
thanks, Bill
The glyphs you are reading now: are place-holders signifying the total absence of a signature.
modified 7-Jul-12 5:36am.
|
|
|
|
|
|
Thanks, Graham,I am aware of that tool, and consider it a definite must-use in the diagnostic phase.
For handling cross-browser compatibility, I am considering the whole gamut of external JS libraries, including (for HTML5) BoilerPlate[^]. For mobile-device display issues I'm finding this article helpful:[^].
And then, there's, of course, Modernizr[^].
But, I am not optimistic that given web-site "X" written by someone's uncle, with the crudest possible HTMl/CSS, that will ever be able to be automatically brought up to standards, without hand-tuning by someone who understands standards compliancy, and the inevitable cross-browser testing, and cross-browser-version testing.
However, there are lots of tools for cross-browser testing I haven't explored yet:[^].
best, Bill
The glyphs you are reading now: are place-holders signifying the total absence of a signature.
|
|
|
|