Hi, I have a controller that returns a FileContentResult that shows a pdf file in the browser. It works correctly in my local system but after I upload my site and try to reach that page I get "The resource cannot be found(HTTP 404)error". any suggestion? :doh:
samMaster
Posts
-
MV3 FileContentResult is not working on my server -
need urgent help how to synchronize web & windows database. Please helpWeb service is an ultimate solution but if you think this way is not possible you can move just the reservations table on web service and you can synchronize other tables at a specific time. On this way you have enough time to convert all your database to web service. Good luck!
-
error String or binary data would be truncated.You have to check your input data. I think if you read a design pattern you can do this on better way. Say! your code is really horrible to understand. You have to try to use classes and generic collections if you want to manage your code. But if you check your input data, you can find the wrong input data type or data length. Good luck!!!
-
call javascript function on Pageload...asp.net with c#RegisterStartupScript registers the startup script with the Page object using a type, a key, a script literal, and a Boolean value indicating whether to add script tags.
public void RegisterStartupScript(
Type type,
string key,
string script,
bool addScriptTags
)Parameters type Type: System.Type The type of the startup script to register. key Type: System.String The key of the startup script to register. script Type: System.String The startup script literal to register. addScriptTags Type: System.Boolean A Boolean value indicating whether to add script tags. So, I think you cant represent the "mykey" in the javascript but you can represent script lirtal and you can send your params using that.
-
convert null to zero in sql server 2005Use a condition on your query for example like this:
IF (SELECT MAX(UploadID) AS id FROM fshUploadedMaster) is null
Select 0 as id
RETURN -
call javascript function on Pageload...asp.net with c#Hi, Test this one:
Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "jsFunctionName('Params');", true);
you can execute scripts on page load event using this way
-
RequiredFieldValidatoradd it in page_Init() or do like this: Add this tag near the TextBox1 and set ValidationGroup for TextBox1
-
tool tipHi, Use java script like this:
var horizontal_offset="9px" //horizontal offset of hint box from anchor link /////No further editting needed var vertical_offset="0" //horizontal offset of hint box from anchor link. No need to change. var ie=document.all var ns6=document.getElementById&&!document.all function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function clearbrowseredge(obj, whichedge){ var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1 if (whichedge=="rightedge"){ var windowedge=ie && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-30 : window.pageXOffset+window.innerWidth-40 dropmenuobj.contentmeasure=dropmenuobj.offsetWidth if (windowedge-dropmenuobj.x > dropmenuobj.contentmeasure) { edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+parseInt(horizontal_offset) } } else{ var windowedge=ie && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 dropmenuobj.contentmeasure=dropmenuobj.offsetHeight if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight } return edgeoffset } function showhint(menucontents, obj, e, tipwidth){ if ((ie||ns6) && document.getElementById("hintbox")){ dropmenuobj=document.getElementById("hintbox") dropmenuobj.innerHTML=menucontents dropmenuobj.style.left=dropmenuobj.style.top=-500 if (tipwidth!=""){ dropmenuobj.widthobj=dropmenuobj.style dropmenuobj.widthobj.width=tipwidth } dropmenuobj.x=getposOffset(obj, "left") dropmenuobj.y=getposOffset(obj, "top") dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rig</x-turndown>
-
Automatically delete data from a database [modified]Hi, I think you can do that using scheduler on sql server 2005. This may be help you: http://www.microsoft.com/technet/prodtechnol/sql/2005/newsqlagent.mspx[^]
-
Using javascript functions ?No no, HyperTest.NavigateUrl is wrong. Say, I test your code in this way:
function PopUpQtyWindow(prodID) { alert(prodID); }
And in behind:protected void testClick(object sender, EventArgs e) { int prodID = 1; Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true); }
This code is working on both IE and firefox browsers. -
Using javascript functions ?Hi, Test this way:
protected void HyperTest_OnClick(object sender, EventArgs e) { try { int prodID = 1 ; Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true); } catch (Exception ex) { throw; } }
-
2 DropDownListsHi, How you fill your drop drown lists? What is their datatext and datavalue fields? Let me know exactly what is your problem.:rose: Thanks, sam
-
Creating a Menu with the Menu objectHi, Do like this:
Dim menuitem1 As New MenuItem("Main topic") Dim menuitem2 As New MenuItem(Sub topic") menuitem1.ChildItems.Add(menuitem2) Me.Menu1.Items.AddAt(0, menuitem1)
-
dynamic bind GridViewHi, Use gridview BoundField like this: AccessibleHeaderText="string" ApplyFormatInEditMode="True|False" ConvertEmptyStringToNull="True|False" DataField="string" DataFormatString="string" FooterText="string" HeaderImageUrl="uri" HeaderText="string" HtmlEncode="True|False" InsertVisible="True|False" NullDisplayText="string" ReadOnly="True|False" ShowHeader="True|False" SortExpression="string" Visible="True|False> Set BoundFields then bound grid view with your data table such as previous reply shown.
-
Error msg: Failed to map the path '/' in file uploadHi, Test this code: fileupload1.PostedFile.SaveAs(Server.MapPath("~\") & "OnLineResumes\" & filename)
-
size of pageHi, Test this code: window.open("a.html", "_blank", "innerHeight=200,innerWidth=300"); for more information see this: http://www.webreference.com/js/tutorial1/features.html[^]
-
How to use a multiple dataset in a single gridIf your data sets table[0], are similar you can Merge tables and create a data table that contain all tables[0] and set this data table as the gride view data source. else dont even think about it
-
Displaying Radio buttons dynamicallyHi Use . you can add each paymentGateway node as a ListItem to this list on pagelaod event.
-
activation by mail??????????jesus! You are angry :laugh: Dont even think about it. Now, do you know how to set a schedulere on sql server 2005? If u have any problem, contact me. best regard.
-
activation by mail??????????In cherto perta chie neveshti yabooo. Ye negahi be schedulere to sql server 2005 bendazi fek konam javabeto begiri. ;P