Ramesh S 129 Posting Pro

Post some code from the code behind class file related to this issue. It will help us to understand the problem.

When the SelectedIndexChanged event is fired, Just check whether the DataBind method for the Grid is reached by putting a break point on that.

Ramesh S 129 Posting Pro

Store the symbols as images and then display it in your web page.

or you can use some third party components.

Try this links:

http://stackoverflow.com/questions/796890/whats-the-best-way-to-write-mathematical-equations-on-the-web
http://www.terradotta.com/MathIWYG.html
http://www.mathtran.org/

Ramesh S 129 Posting Pro
Ramesh S 129 Posting Pro

In the link, A class is given to implement custom paging in a gridview control having dynamic templates.

The class is inheritated from ITemplate which can be used to create dynamic templates in GridView at runtime.

The source does not have any implementation of GridView and its related HTML source.
You need to write code to use that class in your gridview to have the custom paging.

Ramesh S 129 Posting Pro

Change page load event as below

protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)                    
              {
                 Department();
               }
        }
        catch (TimeoutException ex)
        {
            Session.Clear();
            Response.Redirect("~/Student/Login.aspx");
        }
    }
Ramesh S 129 Posting Pro

Write the following code in RowDataBound event of the GridView control. This code is to attach onChange event of the file upload control to the click event of image button control.

imgRespuesta = e.Row.FindControl("imgProDiagUploadRespuesta")fupRespuesta = e.Row.FindControl("fupvcProDiaRutaRespuesta")

fupRespuesta.Attributes.Add("onchange", "return document.getElementById('" + imgRespuesta.ClientID + "').click();")

Write this code in RowCreated event of the GridView. This code is to set style for image button and add handler to it.

imgRespuesta = e.Row.FindControl("imgProDiagUploadRespuesta")
imgRespuesta.Attributes.Add("Style", "Display:none")
AddHandler imgRespuesta.Click, AddressOf img_Click

I have tested this way in C#. It is working for me. I can able to reach img_Click event if a file is browsed and selected.

culebrin commented: Nice approach +2
Ramesh S 129 Posting Pro

Below is the C# code to get the selected items from a CheckBoxList

for (int i=0; i<checkboxlist1.Items.Count; i++)
         {

            if (checkboxlist1.Items[i].Selected)
            {

              //Write your code to store checked items into database
            }

         }
Ramesh S 129 Posting Pro

If you have enabled impersonation and the users of the application has read/write access to the file upload folder(\B\data ) then you don't need to grant 'Network Service' access to that folder.

Did you get any error while uploading files?

Ramesh S 129 Posting Pro
Ramesh S 129 Posting Pro

Request.Form will not force to ovrewrite the session.

Have you identified where the session data is overwritted in your code?

If yes, post that code so that somebody can suggest a solution.

Ramesh S 129 Posting Pro

I already anwered this question in this link http://www.daniweb.com/forums/post907913-3.html

Change connection details as below

<connectionStrings>
  <add name="MyXT" connectionString="Database=XT;Server=YourServerName;Integrated Security=True" providerName="System.Data.SqlClient" />

Replace 'YourServerName' with the name of the server name and instanace name. For example if your server name is HPSERVER1 and SQL server 2000 instance name is HPSQL2000, then connection string will be

<add name="MyXT" connectionString="Database=XT;Server=HPSERVER1/HPSQL2000;Integrated Security=True" providerName="System.Data.SqlClient" />

If you have default instance for SQL Server 2000, then

<add name="MyXT" connectionString="Database=XT;Server=HPSERVER1;Integrated Security=True" providerName="System.Data.SqlClient" />
Ramesh S 129 Posting Pro

Set AutoGenerateColumns property to false.

Ramesh S 129 Posting Pro

You can handle this error

drpcompname.SelectedValue = drd.GetValue(0).ToString();

Replace the above statement with the following code

ListItem item = drpcompname.Items.FindByValue(drd.GetValue(0).ToString());
if (item != null)
        item.Selected = true;
Ramesh S 129 Posting Pro

sandbox account is enough for development and testing.

You can use this account to create and manage test accounts and their associated email and API credentials with paypal.

No need to have a credit card for this purpose.

To create a sandbox account, visit https://developer.paypal.com/

Ramesh S 129 Posting Pro

Try this links:
http://www.codeproject.com/KB/aspnet/image_asp.aspx

The code written in that article uses OdbcConnection for connection with MySQL.

You can use latest .NET Connector for MySQL, and use the MySql.Data.MySqlClient namespace and change your code appropriately.

Ramesh S 129 Posting Pro
Ramesh S 129 Posting Pro
Ramesh S 129 Posting Pro

You also use this syntax

For SQL Authentication,

<configuration>
	<appSettings/>
	<connectionStrings>
  <add name="MyXT" connectionString="Database=YourDatabaseName;Server=YourServerName;User Id=UserName;Password=YourPassword"    providerName="System.Data.SqlClient" />
 </connectionStrings>
	<system.web>

For Windows Authentication,

<configuration>
	<appSettings/>
	<connectionStrings>
  <add name="MyXT" connectionString="Database=YourDatabaseName;Server=YourServerName;Integrated Security=True"    providerName="System.Data.SqlClient" />
 </connectionStrings>
	<system.web>

Replace the following information appropriately

YourDatabaseName - Name of the database you want to connect with
YourServerName - Name of the server of PC where the SQL Server instance running
UserName - Name of the SQL server user name(For SQL Authentication only)
YourPassword - Password for the SQL server user name(For SQL Authentication only)

Ramesh S 129 Posting Pro

Use this sample


HTML Source(.aspx)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DemoPage1.aspx.cs" Inherits="DemoPage1" %>
<!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 id="Head1" runat="server">
    <title>GridView Sample By Ramesh S</title>

    <script type="text/javascript">
        function selectUnselectCheckboxes(chkHeaderCtrl, chkBoxIdInGrid, gridViewName) {
            var chkbox = chkBoxIdInGrid;
            gridViewName = document.getElementById(gridViewName);
            var grdCount = gridViewName.rows.length;

            //the controls in the gridview will have the following suffix in their ids 'GridView1_ctl0n'
            //the first element starts with 2 e.g. GridView1_ctl02_chkEmployee(first element)... GridView1_ctl10_chkEmployee(9th element)
            for (i = 2; i <= grdCount; i++) {
                var ctlIndex = eval(i);
                if (ctlIndex < 10)
                    ctlIndex = '0' + ctlIndex;

                var chkBoxIdInGrid = gridViewName.id + '_ctl' + ctlIndex + '_' + chkbox;
                chkBoxIdInGrid = document.getElementById(chkBoxIdInGrid);

                if (chkBoxIdInGrid != null) {
                    //if the header checkbox is checked, then check the checkboxes in the grid
                    if (document.getElementById(chkHeaderCtrl).checked == true)
                        chkBoxIdInGrid.checked = true;
                    else
                        chkBoxIdInGrid.checked = false;
                }
            }
        }  
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="100%">
            <tr>
                <td>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="500px"
                        BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px"
                        CellPadding="4" OnRowDataBound="GridView1_RowDataBound">
                        <RowStyle BackColor="White" ForeColor="#003399" />
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <asp:CheckBox ID="chkSelectAll" ToolTip="Select/Unselect all employees" onclick="selectUnselectCheckboxes(this.id, 'chkEmployee', 'GridView1');"
                                        runat="server" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkEmployee" runat="server" Checked='<%# Bind("Is_Eligible") %>' />
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Center" Width="50px" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="EmpName" HeaderText="Name">
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="EmpCode" HeaderText="Code">
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Dept">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlDept" DataTextField="Dname" DataValueField="Deptno" DataSource="<%#GetAllDept()%>"
                                        runat="server">
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                        <HeaderStyle BackColor="#003399" Font-Bold="True"
Ramesh S 129 Posting Pro

1. Open the folder , where you placed you assembly .dll, using Windows Explorer.
2. Just right click on the assembly .dll file
3. Go to Versions Tab
4. Click on the File Version item in the Other version informtion panel to see the version details
5. Click on the Language item in the Other version informtion panel to see the version details

Mark as solved if this post answered your question

Ramesh S 129 Posting Pro

It seems that your application uses ASP.NET Ajax Framework assembly.

Have you installed ASP.NET Ajax Framework 1.0 in your system?

Ramesh S 129 Posting Pro

From the web.config, the name of the connection string is 'CourierSystemConnectionString'.

Therefore your code should be as below

Dim strConn As String = 
System.Configuration.ConfigurationManager.ConnectionStrings("CourierSystemConnectionString").ConnectionString

con = New SqlConnection(strConn)
con.Open()
Ramesh S 129 Posting Pro

Post your web.config.

I need to check the ConnectionString name.

Ramesh S 129 Posting Pro

Web App:
Create a web service in the web application with WebDisplay as a WebMethod.

Win App:

Add web reference to the windows application.

Call WebDisplay method and pass the textbox.text as parameter.

Ramesh S 129 Posting Pro

Use NavigateUrl property to move to another page.

Ramesh S 129 Posting Pro

Hi,

Thanks.

From my next post onwards, I will follow that.

kvprajapati commented: Good wishes. +4
Ramesh S 129 Posting Pro

Try the solution given in this link:

http://forums.asp.net/p/1252014/2392110.aspx

Ramesh S 129 Posting Pro

You can use the strong naming tool with the -T option to extract the public key of an assembly.

1. Open the VS command prompt

2. Type the following command

sn -T YourAssemblyName.dll

Ramesh S 129 Posting Pro

con = New SqlConnection(str)

Str is a built-in function in VB.NET, therefore you should not use that.

Change the variable name str to something like strConn.

Hope this will help you.

Ramesh S 129 Posting Pro

I assume that you are uploading the file to a network share folder '\\platon2\greffe2\09-123\'.

If you are running your ASP.NET application, then you need to have read/write access for the 'YourMachineName\ASPNET' account to the shared folder.

I also assume that you might given access only at folder level and not for sharing permission.

If my assumtion is correct, set set access rights to the folder sharing also.

Ramesh S 129 Posting Pro

Dim str As String = ConfigurationManager.AppSettings("Web2.Config") What is web2.config? is it a file name or name of the connection string in the web.config file?

The configuration file of an asp.net application must be web.config.

Also the connection string should be placed in <connectionStrings> section in asp.net 2.0.
For Example

<configuration>
	<connectionStrings>
		<add name="connectionStringName" connectionString="ConnectionString" providerName="System.Data.SqlClient" /> 
	</connectionStrings>
</configuration>

Also you can get connection information in your code using

Dim connectionString As String = System.Configuration.ConfigurationManager.ConnectionStrings("connectionStringName").ConnectionString
Ramesh S 129 Posting Pro

You can get this information from Installer.Context Property.

Check this link:
http://live.mscommunity.net/blogs/notequ/archive/2008/06/05/installer-class.aspx

serkan sendur commented: good information +4
Ramesh S 129 Posting Pro

Try the solution given in this link:

http://www.cryer.co.uk/brian/mswinswdev/ms_vbnet_the_connection_has_been_disabled.htm

Also use .NET Connector for MySQL instead of ODBC connector.

Ramesh S 129 Posting Pro

I have changed PageMethods.getSum to PageMethods.GetSum in the CalcSum javascript function.

It is working for me.

Ramesh S 129 Posting Pro

Try the solution given by Andy0000 in the following link: http://www.webdeveloper.com/forum/archive/index.php/t-174029.html

But it may work in IE only.

Ramesh S 129 Posting Pro

PageMethods must be Public Shared.

Change Public Function GetSum() to Public Shared Function GetSum().