Ramesh S 129 Posting Pro

1. You don't need to enter the physical path to AdvertisementFile property. It should be a relative path.

Change your code as below

<asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile ="~/App_Data/banner.xml"/>

2. You need to give the image file as like AdvertisementFile. For example, if the image file is in the root directory of the web site, then image path should be as below

<ImageUrl>YourImageFileName.jpg</ImageUrl>

If you keep the images in a folder, for example in 'images' folder, then it should be

<ImageUrl>>~/Images/YourImageFileName.jpg</ImageUrl>

3. Impressions is a value that indicates how often an advertisement is displayed in relation to other advertisements in the XML file.

Ramesh S 129 Posting Pro

Try this code. It will convert the text into TitleCase using JavaScript.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DemoPage21.aspx.cs" Inherits="DemoPage21" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script type="text/javascript" language="javascript">
        function Trim(strIn) {
            strOut = strIn;
            strOut = strOut.replace(/^ */g, "");
            strOut = strOut.replace(/ *$/g, "");
            return strOut;
        }


        function TitleCase(oField) {

            var myValue = oField.value
            var htext = Trim(myValue);
            htext = htext.toLowerCase();

            htext = htext.substr(0, 1).toUpperCase() + htext.substring(1, htext.length);
            for (var i = 1; i < htext.length; i++) {
                if (htext.substr(i, 1) == " ") {
                    while (htext.substr(i, 1) == " ")
                        i++;

                    if (i + 1 < htext.length)
                        htext = htext.substr(0, i) + htext.substr(i, 1).toUpperCase() + htext.substring(i + 1, htext.length);
                    else
                        htext = htext.substr(0, i) + htext.substr(i, 1).toUpperCase();
                }
            }
            return htext;
        }
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" onblur="this.value=TitleCase(this);" runat="server" />
      <asp:TextBox ID="TextBox2" runat="server" />

        </div>
    </form>
</body>
</html>
Ramesh S 129 Posting Pro

There is no setting available to display the number to a specific currency format. It is the matter of display in the tool that you are using to view the data.

However you can format the number in SELECT query or format the number in the user interface(like web pages) whaterver currency format you want.

Ramesh S 129 Posting Pro

You can publish asp.net web site in IIS5.1, IIS6. IIS7.

IIS5.1 comes with Windows XP only.

IIS6 is availabe Windows Server 2003.

Also the database server needs to be installed in the server or the server needs to have client software to access the database from other servers(depending on the requirement).

No other software are required to publish your site.

To know more about publishing a web site, visit http://msdn.microsoft.com/en-us/library/1y1404zt(VS.80).aspx
IIS7 is available in Windows 2008/Vista/Windows 7

You need to install proper version of .NET Framework in the server where you want to publish your site.

Ramesh S 129 Posting Pro

Yes. The .NET Framework is essential to run your VB.NET/C# programs. It is an executable setup program(.exe) and can be downloaded from Microsoft website.

Ramesh S 129 Posting Pro

Your code should look like.

If Not Page.IsPostBack Then 
    GrdLogados.DataSource = Membership.GetAllUsers() 
    GrdLogados.DataBind () 
End If 
LblUsuarios.Text = Membership.GetNumberOfUsersOnline ()

You need to create appropriate bound/template columns in the GridView to display user details before binding it.

Also to display "Online" / "Away" status, you need to handle it in the RowDataBound event of the GridView.

Ramesh S 129 Posting Pro

I think you have added System.Windows.Forms namespace in you class file. Check whether the line "using System.Windows.Forms" exist on top of your class file and remove it.

Ramesh S 129 Posting Pro

Do the other machines have .NET Framework installed?

If not, you need to install the correct version of .NET Framework in that PC in order to run your VB.NET program successully.

Ramesh S 129 Posting Pro

The following versions of Vista can support IIS 7.

Windows Vista Ultimate Edition
Windows Vista Home Premium Edition
Windows Vista Business Edition
Windows Vista Enterprise Edition

Refer this link: http://learn.iis.net/page.aspx/28/installing-iis-70-on-windows-vista/

Vista Home Premium Edtion does not support Windows Authentication in IIS. However Vista Ultimate will support it.

Ramesh S 129 Posting Pro

I believe 37000 to 50000 records are too much for a table.

I have seen that some customers are storing more than a million records in a table.

Your database design ensure that normalization techniques to avoid data redundancy.

To improve search performance, you need to create indexes for the columns on which you provided search option.

Please note that some sql server databases used in Microsoft ERP product does not relationships/integrity constraints among the tables. The integrity and relation of the data is validated through front-ent(user interface). But the tables have proper indexes to improve the performance.

sknake commented: MSSQL eats a million records for a snack before breakfast. What are you talking about?! -3
Ramesh S 129 Posting Pro

Ok. So you are trying to call a function in a Module/Form which is defined in a User Control.

You should not call the public method of an UserControl in a Module.

To call the function, you need to instantiate the user control in the module. For example,

Dim  uc1 As UserControl1
 uc1.myFunction()

But this is not the right approach as the user control is GUI component where as the Module is reusable business component.

Ramesh S 129 Posting Pro

There is no such restriction in VB.NET I believe.

You can call public methods of Classes and Modules inside a UserControl.
You need to call them the way you are calling the public methods of Classes and Modules in a Form.

Ramesh S 129 Posting Pro

The OrderedItemTable may not be initialized.

I believe that you are instantiating OrderedItemTable in the following line in
initialize() method.

OrderedItemTable = OrderedItemHandler.GetTable(fullSql)

The above line may not return a DataTable and therefore OrderedItemTable is still not initialized.
Therefore you cannot call NewRow method on an uninitialized DataTable.

Check the above line if it returns a datatable.

Ramesh S 129 Posting Pro

Set the Forms' Icon property to desired icon.

[Edit]

Vineeth is correct. I didn't refresh before posting.

[/Edit]

Ramesh S 129 Posting Pro

The following operating systems will support .NET Framework 2.0.(Refer: this)

Windows 2000 Service Pack 3
Windows 98
Windows 98 Second Edition
Windows ME
Windows Server 2003
Windows XP Service Pack 2

But .NET Framework 2.0 Service Pack 1 can support the following OS only(Refer this)

Windows 2000 Service Pack 4
Windows Server 2003
Windows XP Service Pack 2

You need to install appropriate version of .NET Framework before installing you application.

Ramesh S 129 Posting Pro

Try this.

GRANT EXECUTE  ON sp_OACreate to UserLogin
GO

Here UserLogin is the name of the login that you use to connect with database.

Ramesh S 129 Posting Pro

Try the following Ajax Instant Messager and its is free. Download and explore it.

http://www.asp.net/community/control-gallery/Item.aspx?i=3552

Ramesh S 129 Posting Pro

Hi anudjoe,

Mark this thread as solved if you question is answered.

Ramesh S 129 Posting Pro

The System.Web.UI.MobileControls namespace have controls to be used in Mobile web application in asp.net.

Please note that the ASP.NET Mobile Controls are obsolete. Almost all modern phones do support more standised xhtml, so you don't have to use the asp.net mobile controls. You may need to use mobile web form and related controls only if you have target devices with outdated browers . Otherwise you can use ASP.NET Web Forms for your mobile pages.

The purpose of the mobile development is to access a web site from a mobile phone. The web site can be deployed in a Windows Server like a regular asp.net web site. It cannot be deployed in a mobile device.

Since your database reside in your mobile device, you cannot access it in a mobile web form. You need to develop a mobile device application(desktop application to be deployed in mobile devices) using compact framework.

The SQL Express database can be accessed

Ramesh S 129 Posting Pro

Try like this

SELECT * FROM ClientWHERE (ClientName LIKE 'Anne%') OR (ClientName LIKE '%[ ]Anne%')
ORDER By  PATINDEX ( 'Anne%', ClientName) DESC
, PATINDEX ( '%[ ]Anne%', ClientName)

Here replace the name 'Anne' whatever you want.

Ramesh S 129 Posting Pro

Try the solution given in the following link.
Convert Viedo to .Flv Using c#.net on Web

Also refer this link.
Using ASP.Net To Convert WMV To FLV Using FFMPEG

Ramesh S 129 Posting Pro

You can use a RegularExpression validation for this purpose.

<asp:TextBox ID="TextBox1" runat="server"  />
<asp:RegularExpressionValidator ID="regExTextBox1" runat="server" 
   ControlToValidate="TextBox1"
   ErrorMessage="Minimum password length is 10"
   ValidationExpression=".{10}.*" />
sknake commented: or that +15
Ramesh S 129 Posting Pro

Hi AbhishekGoenka,

Mark this thread as solved if your question is answered.

Ramesh S 129 Posting Pro

As I said in my previous post, give the full physical or absolute path in codebase property and check it.

Physical Path: Enter the path like file:///D:/yourfoldername/vbActiveX.cab

Abosolute Path: You may enter the url like http://www.agoenka.info/vbActiveX.CAB

Also based on the security settings, you may need to give code access permission to the activex control using Code Access Security Policy Tool (Caspol.exe).

Ramesh S 129 Posting Pro

Try something like this

<object id="ctlVBAX" classid="clsid:B7C88829-7BCF-4AB6-95A5-F63ADBEA151A" codebase="file:///C:/Work/vbActiveX.CAB">
                    </object>

Put the name of the folder where you place the activex control in codebase directory.

Ramesh S 129 Posting Pro

Use the following command line utitlity to register a COM DLL.
regsvr32 <dllName>

Also refer the following link if you have any issues in registering and referencing the DLL.

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/c194f361-afcb-47ac-81e9-8be60cbc25a0

Ramesh S 129 Posting Pro

I couldn't find a specific template for SMS site.

But this site has a number of asp.net web site templates. Search there.

Ramesh S 129 Posting Pro

As per your requirement, the three digit number will be the 'maximum value of 3 digit number (for the year and term ) + 1'

Therefore you calculate the number(ie max + 1) only when you save the student details to the database. Therefore the currentNumber will be unique for each student. Also make the combination of Year, term and currentNumber as composite primary key. Hence concurrent requests cannot have the same maximum currentNumber.

Hope this will help you.

Ramesh S 129 Posting Pro

Do you want to browse the XML file from client PC and read it using JavaScript?

If yes, you can't do it .

You can load an XML file from server and read it using JavaScript.

Use XML DOM (Document Object Model) to read XML using JavaScript.

Also you can use XMLHttp object to read XML using JavaScript.

The following links will help you to provide an understanding on XML DOM with sample code.
http://www.w3schools.com/XML/xml_dom_advanced.asp
http://www.w3schools.com/XML/tryit.asp?filename=tryxml_dom_getelement

Ramesh S 129 Posting Pro

Mark this thread 'Solved' if your question is answered.

Ramesh S 129 Posting Pro

ScrollToCaret property can be used in WinForms application and not to use in asp.net application.

You can get that effect using JavaScript.

Try the solution given by serkan sendur.

Ramesh S 129 Posting Pro

You cannot mark Main method as a WebMetho in asp.net web service. The Main method is used in Windows Desktop and Console applications and behave as a startup point. The Web application will not have Main method.

Also please note that the web services are consuemed in other web and desktop applications and not in the web service itself.

Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer

Ramesh S 129 Posting Pro

If the curreny data is a bound column in the GridView, then use the DataFormatString property to format data.

serkan sendur commented: good +8
Ramesh S 129 Posting Pro

Yes you need to iport a namespace

But CDO object model is used to send mails from classic ASP application which is obsolete in ASP.NET.

Microsoft recommends to use System.Net.Mail namespace and related classes to send mail.

Ramesh S 129 Posting Pro

Assigning an empty textbox value another textbox will not throw error.

Could you please post the error messge that you are getting.

You can also post some code which will help us to understand the problem and provide quick solution to you.

Ramesh S 129 Posting Pro

Use the ReportingService Class which contains the methods and properties that can be used to call the Reporting Services Web service.

Using the Render method, you can generate the report as mhtml content.

Assign this mhtml content in the Body of a MailMessage class in asp.net. You need to set IsBodyHtml property to true. Also send it as an e-mail using SmtpClient class.

Ramesh S 129 Posting Pro

Here i have another class file called clsdbconnection which has connection string function called getconnectiondb().

To use that getconnectiondb() function i need to use the class in the present class prod.

How to use the class, I tried all these ways but it gives error

To use the methods/functions of class, you don't need to inherit that class in your present class.

You need to create an instance of the class and call the appropriate method.

For example, to call the getconnectiondb of clsdbconnection in Prod class

clsdbconnection  dbConn = new clsdbconnection ();
dbConn.getconnectiondb ();

If getconnectiondb returns a value, then store it in a appropriate object variable.

Ramesh S 129 Posting Pro

Hi IAMEMINEM,

You have posted a big and long question. The things that you requested cannot be given in one answer.

To build a shopping cart, first you need to freeze the requirement, design the database, write code to implement the requirement. It will definitely need a lot of experience and efforts.

Read articles about shopping cart in asp.net.

Also google about this topic.

Hope the following links are useful.

Build a Shopping Cart in ASP.NET
ASP.NET Shopping Cart Source Code

Ramesh S 129 Posting Pro

You cannot store non-serializable objects in ViewState. It is not supported.

But it can be stored in in-proc session.

Ramesh S 129 Posting Pro

Hi Alexpap ,

Post the complete error message. Becuase the error message that you posted is generic for SMO object.

Also Check the following things:

1. Database connection is estabilished before executing 'Create' method for StoredProcedure object by putting a break point.
2. sp.TextBody has correct syntax.

Ramesh S 129 Posting Pro

The Visual Studio C# Expression Edition does not have crystal report project templates. The Expression Editions of Visual Studio exclude the ability to create reports, connect them to a CrystalReportViewer control, and interact with reports using the Crystal Reports SDK.

You need to buy VS 2008 Standard/Professional editions to create reports.

For more information, see Visual Studio 2008 Product Comparison Guide

Ramesh S 129 Posting Pro

If you are using Oracle database, then you can use System.Data.OracleClient namespace. This namespace does not require ODBC DSN name. I suggest not to use OleDb and Odbc namesspaces which may need to create DSN names.

But Microsoft announced it is deprecating Microsoft OracleClient(System.Data.OracleClient namespace), a Microsoft-built .NET data provider for the Oracle Database because third-party providers, such as Oracle, offer superior ADO.NET providers. For existing Microsoft OracleClient developers, this is an opportunity to take a fresh look at the Oracle Data Provider for .NET (ODP.NET), which is free to download from OTN. In recent years, Oracle has added new features to ODP.NET for performance tuning, user-defined types, advanced queuing, RAC connection pooling, and supporting multiple ODP.NET client versions simultaneously on the same machine. If you use ODP.NET, then you need to use Oracle.DataAccess.Client namespace.

Also visit this link. http://www.oracle.com/technology/pub/articles/cook-vs08.html

Ramesh S 129 Posting Pro

Sometimes you might need to have checkboxes for each row in a GridView control (like Inbox in Gmail). This code snippet helps to select/unselect all checkboxes in the GridView control by clicking the header checkbox. The selectUnselectCheckboxes() javascript function handles this fuctionality. This function is called in the CheckBox in the header template of the GriView. It loops through the GridView control, get the CheckBox elments and the select/deselects the them. I have implemented this functionality in DemoPage1.aspx.

Ramesh S 129 Posting Pro

You mentioned that the SQL query will take 45 minutes to execute. But you have mentioned that CommandTimeout = 1000. The CommandTimeout is the time in seconds to wait for the command to execute. The default is 30 seconds.

Hence you need to increase the timeout to more than (45*60 = )2700. Also increase the Session timeout to more than 45 minutes in web.config. The default is 20 minutes.

Also it is not recommended to run big process under IIS. Becuase if the process exceeds the memory allocated IIS for processing, the asp.net worker process will be broken and the session will restart.

Ramesh S 129 Posting Pro

You can add keywords specific to your project in the <appSettings> section. For example,

<appSettings>
   <add key="SMTPServer" value="YourSMTPServerName"/>
</appSettings>

You can get the value of the keyword in a .NET class as specified below.

string strSMTPServer = ConfigurationManager.AppSettings["SMTPServer"].ToString();

Note that you need to import the System.Configuration namespace in your class file.

Ramesh S 129 Posting Pro

If you use the above method, you need to check this validation in each and every pages of your web application. To avoid this, create a Base Page class which is inheritated from System.Web.UI.Page. All your pages(except login page) in your web application should inherit from this base page. Therefore you can write the above code to validate the user login in the page load event of the base page class. This code will be executed for all pages whenever the user access a page without login.

Alternatively, you can implement ASP.NET Forms Authentication and it will automatically redirect to login page if the user access any of the page without log-in.
To know more about forms authentication, visit the following links

http://msdn.microsoft.com/en-us/library/aa480476.aspx
http://www.exforsys.com/tutorials/asp.net-2.0/forms-authentication-in-asp.net-2.0.html
http://www.codedigest.com/Articles/ASPNET/112_Implementing_Forms_Authentication_in_ASPNet_20.aspx

Ramesh S 129 Posting Pro

Try this link. It describes how to send email using yahoo business account.

Ramesh S 129 Posting Pro

Yes. Apache can be installed in Linux and Windows server environments.

So if you don't have Linux environment, then you can install it in Windows 2003 server. But the port should be configured properly. There won't be no issues. See this.

If your question is answered, mark this thread as solved.

Ramesh S 129 Posting Pro

Various solutions has been in the following link.
http://stackoverflow.com/questions/1327079/how-can-move-up-and-move-down-selected-item-programmatically-in-treeview-in-c

I believe it will be useful for you.

Ramesh S 129 Posting Pro

After installation using an administrator account, you need to run the Visual Studio using an administrator account atleast once. So that some of plug-ins associated with VS will be enabled.

Also you can see if the SP1 is installed in your VS, by clicking Help->About menu.