|
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
|
|
|
|
|
I have selected an item from a drop-down list from one table (i.e. "Event") using EventName, EventID in the drop-down list, and
used that ID (EventID) to select an item from another table (Payments).
If zero rows are selected, how to you make the DetailView
create a new row? The EmptyData text is displayed, but
I'd like for a new row (insert) to be displayed in the DetailsView.
I am using VB in my project.
Thank you ahead of time!
Will
|
|
|
|
|
Hello,
i want to integrate video Conferencing in my web application using asp.net or Jquery.
actually i want to something like user go to my web application URL with specific id means something like private room id and share this URL with other user so both user can do video chat like Google hangout.
i have tried Webrtc sample but in this sample sound i'm facing audio issue(not getting clear audio).
please provide me best solution for the same.
Thanks
|
|
|
|
|
|
If i have WCF service and there are three client and i want to show the only 2 method to client 1 and 3 methods to client 2 and 1 method to client 3. What will be the approach?
|
|
|
|