|
|
When I run my "service" on my dev box, everything works fine, but when I put it "in the cloud", it says it can't find MasterPage.master.cs . Is there something special I have to do to get the master page thing to work? I merely copied the original web site files into the WebRole assembly and put a link to the (clouded) page on the contest entry default page.
I don't understand why it works on my dev box but not when it's been uploaded to "the cloud".
SOLUTION =======================
On all of my aspx files, I was using CodeFile= (this is okay for a normal web site) instead of CodeBehind= (I think you have to use this for a web *application*).
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
modified on Sunday, December 13, 2009 9:24 AM
|
|
|
|
|
John Simmons / outlaw programmer wrote: On all of my aspx files, I was using CodeFile=
Yes.. Thats the common issue we all face while migrating. Website needs CodeFile while Web App needs CodeBehind . Microsoft shouldnt have renamed this keyword...
|
|
|
|
|
Ha... Whenver I have such problem when trying to add a file from existing project, I always right click on it and "Convert to Web Application" solves the problem, but I dont know that, thats because of CodeFile and CodeBehind...
|
|
|
|
|
Hi ,
I am looking for all IIS commands, which we can run from command prompt.
I googled it but was’t able to find all commands.
I really appreciate if you guys help me out.
Thanks
|
|
|
|
|
|
in c#;
Take ^[a-z]$ for example,
how to get a string list of "a b c d e f g h i j k l m n o p q r s t u v w x y z"?
cyh
|
|
|
|
|
I don't think it is possible, unless your regex is complex enough to match an extremely specific string.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
I'm a winform dev working on a toy asp project and it has been 5 years since I have worked with ASP so....
I have a datatable of image urls and need to display a list of images (4 wide). Should I use a ListView or a DataList?
I need to maintain a navigation list (chicken tracks) in the master page, is there a control to facilitate that?
Databinding.
Normally I bind to a datatable, is this valid in ASP or should I use a List<> of objects. I do not like to use the datasource objects as it just seems wrong to have them in the UI.
Recommendations and article links will be appreciated.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
http://www.google.co.in/search?client=opera&rls=en&q=asp.net+image+gallery&sourceid=opera&ie=utf-8&oe=utf-8
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Ok so I got the listview working with a hyperlink in the itemdetail - works perfectly
Image galleries are not quite what I was looking for, they will definitely come into play later though.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Why dont you create your own html using Repeater ?
You can use ListView as well...
Images can be displayed very easily. Just use ItemDataBound event to Resolve the image url and place it in the image control.
Please let me know what exactly the problem you are facing.
|
|
|
|
|
I am looking for a recommendation as to which control to use, when facing a new platform there are a number of controls that will do the job, which one is best for a particular job can take some time to define. I was hoping to shortcut that work.
I used a listview, still looking for ideas on the 'chicken tracks' navigation requirement.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes.. According to my recommendation I would have created all html myself to have a better grasp on the code which is transferred to the Clients.
I would go for asp:Repeater .
|
|
|
|
|
Abhishek Sur wrote: I would go for asp:Repeater.
Ah bugger - now I have to go and look at the dammed repeater thingy.
Thanks Abhishek
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
I used the below coding to save and image into MS-Access Database as Binary Data. Now How to again load an image back from database to ImageBox with the same method of this coding?
<br />
Dim photoStream As Stream = ImageUpload.PostedFile.InputStream<br />
Dim photoLength As Integer = ImageUpload.PostedFile.ContentLength<br />
Dim photoMime As String = ImageUpload.PostedFile.ContentType<br />
Dim photoName As String = Path.GetFileName(ImageUpload.PostedFile.FileName)<br />
Dim photoData() As Byte = New Byte((photoLength) - 1) {}<br />
photoStream.Read(photoData, 0, photoLength)<br />
Dim cmd As New OleDbCommand("insert into ImageTable(ImageName,ImageData) values(?,?)", DataConn)<br />
cmd.Parameters.AddWithValue("", photoName)<br />
cmd.Parameters.AddWithValue("", photoData)<br />
DataConn.Open()<br />
cmd.ExecuteNonQuery()<br />
DataConn.Close()<br />
Response.Write("Image Added")<br />
IT Professional.
Work till you get it!
|
|
|
|
|
|
Hello.
Ive Tried your given code but im having errors that my insert statement is not correct .. i cant find what is not correct with my statement .. here is my code
If PhotoUpload.HasFile Then
Dim photoStream As Stream = PhotoUpload.PostedFile.InputStream
Dim photoLength As Integer = PhotoUpload.PostedFile.ContentLength
Dim photoMime As String = PhotoUpload.PostedFile.ContentType
Dim photoName As String = Path.GetFileName(PhotoUpload.PostedFile.FileName)
Dim photoData() As Byte = New Byte((photoLength) - 1) {}
photoStream.Read(photoData, 0, photoLength)
Dim cnn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\TestImage.mdb; Persist Security Info=True")
Dim cmd As New OleDbCommand("INSERT INTO ImageTable(ImageName,Image) VALUES(?,?)", cnn)
cmd.Parameters.AddWithValue("", photoName)
cmd.Parameters.AddWithValue("", photoData)
cnn.Open()
cmd.ExecuteNonQuery()
Response.Write("Image Added")
End If
hope you can help me
|
|
|
|
|
Hi used the below coding for enrypting and decrypting a text. But with this i dont know how to save to a database, when i tried i am getting many errors. How to do this?
Private Sub cmdEncrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br />
' Encrypt<br />
MyText = Encrypt(textbox1.text, "aabc123a") ' Here aabc123a is the key and textbox1.text is the text which you want to encrypt<br />
End Sub<br />
<br />
Private Function Encrypt(ByVal strText As String, ByVal strEncrKey As String) As String<br />
Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}<br />
Try<br />
Dim bykey() As Byte = System.Text.Encoding.UTF8.GetBytes(strEncrKey)<br />
Dim InputByteArray() As Byte = System.Text.Encoding.UTF8.GetBytes(strText)<br />
Dim des As New DESCryptoServiceProvider<br />
Dim ms As New MemoryStream<br />
Dim cs As New CryptoStream(ms, des.CreateEncryptor(bykey, IV), CryptoStreamMode.Write)<br />
cs.Write(InputByteArray, 0, InputByteArray.Length)<br />
cs.FlushFinalBlock()<br />
Return Convert.ToBase64String(ms.ToArray())<br />
Catch ex As Exception<br />
Return ex.Message<br />
End Try<br />
End Function<br />
<br />
Private Sub cmdDecrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click<br />
MyText = Decrypt(TextBox2.Text, "aabc123a")<br />
End Sub<br />
<br />
Private Function Decrypt(ByVal strText As String, ByVal sDecrKey As String) As String<br />
Dim IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}<br />
Dim inputByteArray(strText.Length) As Byte<br />
Try<br />
Dim byKey() As Byte = System.Text.Encoding.UTF8.GetBytes(sDecrKey)<br />
Dim des As New DESCryptoServiceProvider<br />
inputByteArray = Convert.FromBase64String(strText)<br />
Dim ms As New MemoryStream<br />
Dim cs As New CryptoStream(ms, des.CreateDecryptor(byKey, IV), CryptoStreamMode.Write)<br />
cs.Write(inputByteArray, 0, inputByteArray.Length)<br />
cs.FlushFinalBlock()<br />
Dim encoding As System.Text.Encoding = System.Text.Encoding.UTF8<br />
Return encoding.GetString(ms.ToArray())<br />
Catch ex As Exception<br />
Return ex.Message<br />
End Try<br />
End Function<br />
<br />
Remember to add top of import: Imports System.Security.Cryptography
IT Professional.
Work till you get it!
|
|
|
|
|
Tell me what error you are getting ?
The code looks ok to me.
|
|
|
|
|
How do i make the menu selected item have a different color? tabbed menu
I am using the ASP.NET MVC default template.
Well i want the menu i'm in to have a different color.
Found this in the css but it does not produce any results. I've searched around the web, most people have solutions that require you to modify the menu alltoghether, having a variable to keep "tabs" on what is selected. Why isn't this working by default?
ul#menu li.selected a
{
background-color: #fff;
color: #000000;
}
|
|
|
|
|
Hi
You can use this css code
ul#menu li a:Hover
{
background-color: #fff;
color: #000000;
}
I dont understand what you mean in this code
ul#menu li.<big>selected</big> a
{
background-color: #fff;
color: #000000;
}
I think that LI element does not have selecting capability
If you want to use Pseudo-class you should write like
ul#menu li:selected
but I am not sure that selected be a Pseudo-class
Mohammad Khansari
|
|
|
|
|
I stumbled over this too. In order to use the "selected" style for the tab in the standard MVC site.css file, you need to have the selected class be assigned to the <li> rather than the <a> tag.
ul#menu li.selected a
{
background-color: #fff;
color: #000000;
}
So to show the About item selected, for your menu use:
<ul id="menu">
<li><%= Html.ActionLink("Home", "Index", "Home")%></li>
<li><%= Html.ActionLink("Sites", "Index", "Sites")%></li>
<li class="selected"><%= Html.ActionLink("About", "About", "Home")%></li>
</ul>
|
|
|
|
|
I'm trying to migrate a web site to an azure application, and when I try to compile, it doesn't see the dropdown list controls on the web forms.
Why is that?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Dropdown Lists (and List Boxes) are windows forms controls sucked into the browser by Microsoftie magic. and (WAG) either won't be rendered the same way in Azure, or haven't been migrated yet.
|
|
|
|