Click here to Skip to main content
       

ASP.NET

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionCCTV camera on ASP web Pagemembersandeep Nishad29 Jun '12 - 0:19 
Dear friend ,
 
have you any idea how can we see CCTV camera on web Page using ASP .net if you have any Clue please tell
AnswerRe: CCTV camera on ASP web PagemvpSandeep Mewara29 Jun '12 - 3:42 
CCTV camera will be like having a webcam displayed in webpage.
 
For webcam related, have a look at the following CodeProject archives:
Webcam using DirectShow.NET[^]
WebCam Fast Image Capture Service using WIA[^]
Your First Step to the Silverlight Voice/Video Chatting Client/Server[^]
Silverlight 4: Capturing Video from Default Webcam[^]

Questionhow to sent mail using smtp.bizmail.yahoo.commembergyanendragope28 Jun '12 - 23:42 
how to sent mail using smtp.bizmail.yahoo.com in asp.net.
 

 
i have account in smtp.bizmail.yahoo.com
AnswerRe: how to sent mail using smtp.bizmail.yahoo.commemberVani Kulkarni29 Jun '12 - 0:07 
Hello Gyanendra,
You can go through following links for your answer:
http://forums.asp.net/t/1457421.aspx[^]
http://www.4guysfromrolla.com/articles/072606-1.aspx[^]
http://www.dotnetspider.com/forum/303316-Error-sending-mail-asp.net.aspx[^]
Thanks & Regards,
Vani Kulkarni

Questionweb form 2010 errormemberclassy_dog28 Jun '12 - 17:07 
I am asking this question since I have very little experince working with master pages in a C# 2010 web form application. I am trying to put my code into production, but the production code is causing a problem. Basically I know what the error is but I do not know how to fix the problem. Thus I am hoping you can tell me how to fix the problem

Note:There is the file in the following location: sub/TestMasterPage.ascx

Problem: Error 19 Could not load file or assembly 'MasterPages' or one of its dependencies. The system cannot find the file specified. C:\Users\dst\Documents\Visual Studio 2010\Projects\Support\TestPage.aspx 2

The code:
 <%@ language="c#" debug="true" trace="false" %> 
<%@ Register TagPrefix="mp" namespace="Microsoft.Web.Samples.MasterPages" assembly="MasterPages" %> 
 
<script runat="server"> 
    void ClickedCapitalize(object o, EventArgs e) { 
        capitalized.Text = Server.HtmlEncode(tb1.Text.ToUpper()); 
    } 
 
    void SayHello(object o, EventArgs e) { 
        name.Text = Server.HtmlEncode(tb2.Text); 
    } 
</script> 
 
<mp:contentcontainer runat="server" MasterPageFile="sub/TestMasterPage.ascx"> 
 
<mp:content id=region1 runat="server"> 
    <a href="MasterPages.htm" runat="server">Relative link test</a><br> 
    <asp:textbox id=tb1 runat="server"/><asp:button text=Capitalize onclick=ClickedCapitalize runat="server"/> 
    <asp:literal id=capitalized runat="server"/> 
</mp:content> 
 
<mp:content id="region2" runat="server"> 
    <asp:textbox id="tb2" runat="server"/><asp:button text="Say hello" onclick="SayHello" runat="server"/> 
    Hello <asp:literal id="name" text="[name goes here]" runat="server"/>! 
</mp:content> 
 
</mp:contentcontainer> 

AnswerRe: web form 2010 errormvpSandeep Mewara28 Jun '12 - 22:16 
Couple of things:
1. Page register attribute:
<%@ Register TagPrefix="mp" namespace="Microsoft.Web.Samples.MasterPages" assembly="MasterPages" %> 
No idea how you got this!
 
For a Master page, default looks like:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
 
For a content page, default looks like:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ContentTestMaster.aspx.cs" Inherits="ContentTestMaster" %>
 
2. Contentcontainer?
<mp:contentcontainer  runat="server" MasterPageFile="sub/TestMasterPage.ascx">

What does or where from this line of code came? Looks like you are trying to reference a custom master page kind of stuff. Is that needed?
 

Look here on how to implement Master Page in ASP.NET:
MSDN: ASP.NET Master Pages[^]
ASPNET: ASP.NET Master Pages Tutorials[^]
CP: ASP.NET 2.0 Master Pages[^]

GeneralRe: web form 2010 errormemberclassy_dog29 Jun '12 - 3:18 
I obtained this code from the contractor who wrote the application. I do not know how they set this test code up.
What would you recommend I change?
GeneralRe: web form 2010 errormvpSandeep Mewara29 Jun '12 - 3:39 
Already shared masterPage concept links with you. Have a look at them and try out. If you get stuck, share with us.

QuestionGrid view binding in page load in 3tiermemberprasadbhagat28 Jun '12 - 7:08 
how to bind the gridview in page load using 3 tier architecture
 
thank you
AnswerRe: Grid view binding in page load in 3tiermembermark merrens28 Jun '12 - 9:41 
That's a big question. What have you already tried for yourself?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
 
me, me, me

GeneralRe: Grid view binding in page load in 3tiermemberRajkumarhi528 Jun '12 - 19:22 
yes.....
AnswerRe: Grid view binding in page load in 3tiergroupKarthik Harve28 Jun '12 - 20:08 
Hi,
 
check these links..
 
http://www.dotnetfunda.com/articles/article71.aspx[^]
http://www.dotnetspider.com/forum/286039-tier-architecture-using-gridview.aspx[^]
How To Bind Data In Data GridView ?[^]
http://csharp.net-informations.com/datagridview/csharp-datagridview-tutorial.htm[^]
http://nareshkamuni.blogspot.in/2012/04/inserting-and-retreiving-data-from.html[^]
 
If you have tried some thing else, what is the problem you are facing..??
Karthik Harve

AnswerRe: Grid view binding in page load in 3tiermemberAshishChaudha29 Jun '12 - 22:26 
do you know about the Business Logic??
AnswerRe: Grid view binding in page load in 3tiermemberRahul Rajat Singh29 Jun '12 - 22:54 
This article has an application implemented in 3 tier architecture. It is using repeaters controls in lots of places and data binding it using data coming from database using 3-tier architecture.
 
I suggest you look this. basic philosophy will remain the same, just grid view specific stuff will be needed.
 
YaBlogEngine - A Tiny Blog Engine written in ASP.NET/C#[^]
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.

Questionweb form staying activemembersc steinhayse28 Jun '12 - 5:30 
I am working on a C# 2010 web form application that I will deploy within the next day or two. I am assuming there is probably some kind of a time limit that the web form pages will stay active?
 
If so, can you tell me where i can find how long a web form will stay active in case I need to increase or decrease the timeout limit?
 
If not, is there no time limit?
 
Can I overrride a timetime limit if I want to?
AnswerRe: web form staying activemvpSandeep Mewara28 Jun '12 - 5:48 
sc steinhayse wrote:
I am working on a C# 2010 web form application that I will deploy within the next day or two

You say you developed/developing an application. Ok. Have you used session in it anywhere?
 
It would be strange if you used it but not aware of it getting timeout. It's default value is 20 minutes. It can be increased/decreased by setting the timeout in Web.Config file.
Details here: MSDN: HttpSessionState.Timeout Property [^]
 
If you are using Form Authentication in your application then it too has a timeout parameter.
Details here: MSDN: forms Element for authentication (ASP.NET Settings Schema)[^]
 
Handle the timeouts as per your need. Do verify them before setting as having different values for both would not make much of a sense.

QuestionBest way to display Card Information to the admin or usermemberHamidakhanam28 Jun '12 - 3:33 
Hello all
 
I am developing an application in dot.net.Now i have take card details(master card, visa card or nay other card) of the user.I want to hide the details so nobody can miss use them
How to show only last 4 characters of credit card /visa card or any other card to the admin as well as to the user.This will be for security.What will be the best way to store and display details keeping security in view.
I also want to know about SSL and how to use it
AnswerRe: Best way to display Card Information to the admin or usermvpRichard MacCutchan28 Jun '12 - 5:09 
See this question[^]; please post in one forum only.

AnswerRe: Best way to display Card Information to the admin or usermemberjkirkerx28 Jun '12 - 8:54 
You have to cloak the card number, it's pretty easy to do.
 
cloakNumber = Left(cardNumber, cardNumberLength-4) & "XXXX"
 
As far as tips and tricks goes for securing card numbers, I suggest you read the PCI Document first, understand it, and then create a plan to implement it before writing any code.
 
PCI Security Standards
 
Words of wisdom, no matter how secure you make it, somebody will always find a way to break in.
 
The PCI requirements are weak, but a good start for those who are not capable to think of all the possible ways to steal data.
 
I have to give you a chuckle, you have no idea what your in for after you read the document. Big Grin | :-D
QuestionHow to identify Event handling in TFS 2012 for Bug work item onltmemberamit sahu2028 Jun '12 - 0:27 
I have created an event handling class library to handle TFS2012 event lag it is working fine. But i have to handle such event only in case of Bug work Item type change.
how i identify work item type in event handling code.
 
Summary of code as
public EventNotificationStatus ProcessEvent(TeamFoundationRequestContext requestContext, NotificationType notificationType, object notificationEventArgs,
                                                    out int statusCode, out string statusMessage, out ExceptionPropertyCollection properties)
        {
            string str = requestContext.ServiceHost.Name;
          statusCode = 0;
          properties = null;
          statusMessage = String.Empty;
 
            if (notificationType == NotificationType.Notification && notificationEventArgs is WorkItemChangedEvent)
            {
                WorkItemChangedEvent ev = notificationEventArgs as WorkItemChangedEvent;
                string asw = ev.Title;
                // EventLog.WriteEntry("WorkItemChangedEventHandler", "WorkItem " + ev.WorkItemTitle + " was modified");
               
                System.IO.StreamWriter objWriter = new System.IO.StreamWriter(@"C:\Amit\ClassLibrary1\AssignedToHandler.txt");
                objWriter.WriteLine("Received WorkItemChangedEvent");
                objWriter.Close();
 
            }
 

            return EventNotificationStatus.ActionPermitted;
        }

AnswerRe: How to identify Event handling in TFS 2012 for Bug work item onltmemberjkirkerx28 Jun '12 - 11:50 
amit sahu20 wrote:
how i identify work item type in event handling code.

Are you sure a == operator is the correct way to compare the values?.
 
What are the actual values?
 
Maybe your comparing the pointers to the objects, and not the value held by the objects.
 
if (notificationType == NotificationType.Notification && notificationEventArgs is WorkItemChangedEvent)
 
Or are you doing a double comparison?
 
if (( notificationType == NotificationType.Notification ) && ( notificationEventArgs is WorkItemChangedEvent ))

Questionasp. net deploymentmembersc steinhayse27 Jun '12 - 19:13 
I am setting up a visual studio.net 2010 web form deployment and setup package. I would like to know if there is a way to keep the web.config file separate from the msi and setup installler packages? This way if any changes need to be made to the web.config file only, a new install for the web site would not be required.
If this is possible can you tell me how to accomplish this goal?
AnswerRe: asp. net deploymentmemberVani Kulkarni28 Jun '12 - 0:56 
Hello,
My experience says that you can rename it as Web.Config.dev, Web.Config.SIT, Web.Config.UAT, Web.Config.PROD and rename the file according to the environment. Smile | :)
You can even go through following links with similar discussion:
http://www.velocityreviews.com/forums/t112746-deployment-in-2-0-how-to-not-overwrite-web-config.html[^]
http://forums.asp.net/t/1528920.aspx/1[^]
http://discuss.joelonsoftware.com/default.asp?dotnet.12.572561.7[^]
Thanks & Regards,
Vani Kulkarni

QuestionStoring file in a Stream rather than storing in the filememberindian14327 Jun '12 - 11:04 
Hi,
 
In an asp.net application I am converting .doc file in to .pdf file, and then making that file as Tiff file. So this pdf file is temperary.
I want to avaoid this pdf file to be stored in the physical path and want to store it in the some memory stream (text stream whichever is good) for temporary purpose and then use that memory stream to be converted to Tiff. And this memory stream should be like a .pdf file' memory stream.
 
Is there any way to do that can anybody please help me in this. Below is the code that I wrote to convert the .doc file to .pdf file and storing in a physical location.
 
   Private Sub convertDoc2PDF(ByVal Source As Object, ByVal Target As Object)
        If MSdoc Is Nothing Then
            MSdoc = New Microsoft.Office.Interop.Word.ApplicationClass()
        End If
 
        Try
            MSdoc.Visible = False
 
            MSdoc.Documents.Open(Source, Unknown, Unknown, Unknown, Unknown, _
                      Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, _
                      Unknown, Unknown, Unknown, Unknown, Unknown)
            MSdoc.Application.Visible = False
 
            MSdoc.WindowState = Microsoft.Office.Interop.Word.WdWindowState.wdWindowStateMinimize
 
            Dim format As Object = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF
 
            MSdoc.ActiveDocument.SaveAs(Target, format, Unknown, Unknown, Unknown, _
         Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, _
         Unknown, Unknown, Unknown, Unknown, Unknown)
 

        Catch ex As Exception
 
        Finally
            If Not MSdoc Is Nothing Then
                    MSdoc.Documents.Close(Unknown, Unknown, Unknown);
                'WordDoc.Application.Quit(ref Unknown, ref Unknown, ref Unknown); 
            End If
            MSdoc.Quit(Unknown, Unknown, Unknown)
        End Try
    End Sub
Thanks & Regards,
 
Abdul Aleem Mohammad
St Louis MO - USA

AnswerRe: Storing file in a Stream rather than storing in the filemembermark merrens27 Jun '12 - 11:28 
Not exactly a cross-post but pretty close.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
 
me, me, me

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid