|
Hello friends! I'm having trouble with my website design. I am designing a site which I have been previewing with firefox and the appearance was ok by me. But when I previewed it with internet exploerer, everything scattered. Please I need a solution to this, so that the appearance can be the same in all browsers. Any advice is welcome.
|
|
|
|
|
That's not a ASP.net issue, but a HTML issue.
Creating HTML that works on all browsers is an art form, or a skill that takes a while to learn.
You really need to use CSS styling to set your widths and heights. style="width: 145px; height: 120px;"
Then run the page output through a HTML validator, online service
And fix all the reported errors.
Some people use browser detectors, and will adjust the CSS according to the browser brand and version number. In my opinon, in the long run, this is a bad idea.
Take Internet Explorer 10 an up, Microsoft went out of there way to make the browser undetectable, to correct rendering issues on the websites that do browser detection to fix rendering issues.
|
|
|
|
|
Hi,
ValidateAntiForgeryToken is not been applied for Controller method calling JGrid get details in ASP.Net MVC. Any suggestions on this please.
regards
Sreenath
|
|
|
|
|
I tried to add some HtmlGenericControls dynamically but not successful. The simplified related code is below. Please help if you find the problem. Thanks.
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="container">
<div id="thumbs" class="navigation" runat="server">
<ul id="UL_1" class="thumbs noscript" runat="server" >
</ul>
</div>
<div style="clear: both;"></div>
</div>
//-------
protected void Page_Load(object sender, EventArgs e) {
HtmlGenericControl li = new HtmlGenericControl("li");
li.ID = "1";
HtmlGenericControl anchor = new HtmlGenericControl("a");
anchor.Attributes.Add("class", "thumb");
anchor.Attributes.Add("name", "2");
anchor.Attributes.Add("href", "Images/1.jpg");
anchor.Attributes.Add("title", "xxxxxxxx");
HtmlImage img = new HtmlImage();
img.Src = "Images/2.jpg";
img.Alt = "Tile #1";
img.Width = 80;
img.Height = 80;
anchor.Controls.Add(img);
li.Controls.Add(anchor);
UL_1.Controls.Add(li); // UL_1 - HTML control defined in the .aspx
}
|
|
|
|
|
Do you have AutoEventWireup enabled?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Homer: Thanks for your response. 'Yes' to the AutoEventWireup:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="MapGallery2.aspx.cs" Inherits="MapGallery2" Trace="true" %>
|
|
|
|
|
And if you put a Trace.Write call in your Page_Load method, does the message appear in the trace output?
Have you checked the generated HTML source? You might find that the HTML is being generated, but isn't showing for some other reason.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Homer: Thanks again for your response. I checked Trace and found nothing strange there. Per your advice, I checked the HTML source. See the related part below:
<ul id="ctl00_ContentPlaceHolder1_UL_1" class="thumbs noscript">
<li id="ctl00_ContentPlaceHolder1_1">
<a class="thumb" name="2" href="Images/1.jpg" title="xxxxx">
<img src="Images/2.jpg" alt="Tile #1" width="80" height="80" />
</a>
</li>
</ul>
I couldn't find anything wrong there either.
|
|
|
|
|
Your code is generating the HTML as expected. If it's not displaying, then something else is going wrong. Perhaps your CSS rules are causing it to be hidden?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Homer: Thanks for your comment. Originally, all of the HtmlGenericControls are coded in the aspx that does contains several customized css. The page displays well. Then I coded the HtmlGenericControls in code-behind. I will debug if I can find the reason. Thanks again for your time and advice.
|
|
|
|
|
I don't know how to add on
1.emotion
2.sound[when I send out my message]
3.[time of send out & seen] feature
4.count number of user in room
5.private chat to someone
In bottom that 3 I showed is my class and html in my project
==index.html==
<!DOCTYPE html>
<html>
<head>
<title>SignalR Simple Chat</title>
<style type="text/css">
.container {
background-color: #99CCFF;
border: thick solid #808080;
padding: 20px;
margin: 20px;
}
</style>
</head>
<body>
<div class="container">
<input type="text" id="message" />
<input type="button" id="sendmessage" value="Send" />
<input type="hidden" id="displayname" />
<ul id="discussion">
</ul>
</div>
<script src="Scripts/jquery-1.10.2.min.js"></script>
<script src="Scripts/jquery.signalR-2.0.0.min.js"></script>
<script src="/signalr/hubs"></script>
<script type="text/javascript">
//Use for check what method I'm using
$.connection.hub.logging = true;
$(function () {
// Declare a proxy to reference the hub.
var chat = $.connection.chatHub;
// Create a function that the hub can call to broadcast messages.
chat.client.broadcastMessage = function (name, message) {
// Html encode display name and message.
var encodedName = $('<div />').text(name).html();
var encodedMsg = $('<div />').text(message).html();
// Add the message to the page.
$('#discussion').append('<li><strong>' + encodedName
+ '</strong>: ' + encodedMsg + '</li>');
};
// Get the user name and store it to prepend to messages.
$('#displayname').val(prompt('Enter your name:', ''));
// Set initial focus to message input box.
$('#message').focus();
// Start the connection.
$.connection.hub.start().done(function () {
$('#sendmessage').click(function () {
// Call the Send method on the hub.
chat.server.send($('#displayname').val(), $('#message').val());
// Clear text box and reset focus for next comment.
$('#message').val('').focus();
});
});
});
</script>
</body>
</html>
==ChatHub==
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.SignalR;
namespace SignalRChat
{
public class ChatHub : Hub
{
public void Hello()
{
Clients.All.hello();
}
public void Send(string name, string message)
{
Clients.All.broadcastMessage(name, message);
}
}
}
==Startup==
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(SignalRChat.Startup))]
namespace SignalRChat
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.MapSignalR();
}
}
}
|
|
|
|
|
what is the difference between console.writeline and system.console.writeline??
|
|
|
|
|
system.
Really, this is a very basic part of C#, and a read of your notes, or search of MSDN could find you the answer[^].
I am not sure why you posted in the ASP.NET forum.
Veni, vidi, abiit domum
|
|
|
|
|
of course this is a basic question, But if you want really know what's is difference between this, I am try clear you confusion. First of All what is the Role of System. we can say System is main DLL or Parent DLL. When we are using the
using System; system automatic call this DLL.
you can seen many DLL call by default in Code Behind Page like this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using System.Data;
When we not used the Using System; Our system compiler Generate the Error like that
The type or namespace name 'EventArgs' could not be found (are you missing a using directive or an assembly reference)
why we again Repeat this world System.Console.output.
sorry I have no time more for explain. try understand itself.
Happy coding
jsb
|
|
|
|
|
Hi
i have a simple web app which display some webparts from external assemblies. user can select available webParts and add to selected zone via this code :
Type type = _dicWebparts[this.ddlWebParts.SelectedValue];
WebPart webPart = (WebPart)Activator.CreateInstance(type);
this.WebPartManager1.AddWebPart(webPart, this.WebPartManager1.Zones[this.ddlZones.SelectedValue], 0);
but as u see in the last line (where cause the problem), i'm facing this error :
System.InvalidOperationException: Cannot add a control of Type MyWebPart1.MyWebPart1. The Type must be loadable by BuildManager.GetType(string typeName).
How to solve this problem ?
thanks in advance
|
|
|
|
|
|
Hi
this is my first question on code project. I am in problem, I have a one pop j-query in this pop have two text form and two's button. I have try with the help of session but i failed. plz tell me how can done this.
|
|
|
|
|
I need to generate a Uniq 8 digit time stamp.
Stopwatch.GetTimeStamp is 12 digit. How can I get 8 digit?
|
|
|
|
|
|
I have tried creating a comment section page using data controls like listview and repeater control to display comments and I was wondering how to add reply options on it. I want to create a comment section page with reply option and the users are able to delete its comment as well by hovering the mouse where the close button will show just like any popular websites we've known. Please give me an idea on how to do this or any articles that demonstrate on how to do this kind of scenario...Thanks for any help.
|
|
|
|
|
|
give the detail information of sql and asp.net
kuldeep patil
|
|
|
|
|
|
Member 10461572 wrote: give the detail information of sql and asp.net Not clear, could you please rephrase your question?
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
try this link, I hope this video clear a lot of confusion about asp .net and Sql. Try this
|
|
|
|