Thanks for your replay and sorry for my mistaks in my post.
As you said, the clssess I pass is dynamic. I used a listbox (selection mode - mulltiple)for selecting the classes. Each time the number of classes is different according to listbox selection.
I tried using the query you provided. But I got the result as null. would you please help me to solve it.
Regards.

Hi,
I have 2 tables tbl_class & tbl_Divisions.
structure:

tbl_class tbl_Divisions tbl_class_division

class_Id (pk) division_Id(pk) class_division_id(pk)
class_name division_name class_Id(fk)
division_Id(fk)

In my application I want to select division_Id,division_name by passing more than one class_id.
if I pass 3 class_Id's , I want to get only those divisions that are common to all the 3 classes.
How can i written a query for that.

I used join query , but I got all the divisions the 3 classes have.

Thanks in advance.

Hi,
I have a listbox with databinding . It has more then 15 items .

And I need to auto scroll to the selected item may be item 10 in the code file
I used a jQuery like

<script type="text/javascript" language="javascript">
         function LstFocus() {
             $('#<%= LstBoxClasType.ClientID %>').find(':selected').filter(':first').focus().attr("selected", true);
         }

    </script>

But it work in mozilla firefox only and not not work in IE.
How can I do that ?

Thanks in advance.

Thanks Syed.

Hi,
I just need to get all the months or monthid between 2 dates like '02/04/2012' and '08/07/2013'.
I search it for a long time. But i get only the date difference.
Can i get this in asp.net.

regards,
sreevidya

hai ,

I need to get the monthnames between 2 dates such as 01-04-2012 & 30-03-2013 .
Can you help me to get it.

Thanks in advance,
sreevidya

Hai ,
the sample datea like :

if [B]Transport_Details[/B] table contains following data,

[B]user_id FareStageId StartDate EndDate[/B]

sam        fs1       01- 06-2011   30- 02-2012
ann        fs4       01- 10-2011   30- 02-2012
raj       fs2       01- 06-2011   30- 02-2012

and I need a result based on a particular month that between start date and enddate
if the monthid is 8 , my expected result is:

[B]user_id Fee[/B]
sam 200
roni 250

But I got 3 records.

Hai ,
I have 2 tables

  1. [B]Transport_Details[/B] having columns
    user_id
    FareStageId
    StartDate
    EndDate

and

  1. [B]Route_Fee[/B] having columns
    FareStageId
    monthId
    fees
    I need to get a monthwise list by passing monthid.
    My problem is that , if start date and enddate of a user are 02-08-2011 and
    20-02-2012 and I need to get the list of 4th month , but this user also listed.
    Query I used is:

[CODE]select Transport_Details.User_Id, Route_Fee.Fee, from Transport_Details join Route_Fee
on Transport_Details.Bus_Route_Fare_Stage_Id=Route_Fee.Bus_Route_Fare_Stage_Id where Route_Fee.Month=4 [/CODE]

Can i get the list of those users , the monthid between startdate and enddate.
Thanks in advance.

Hai ,
I tried using the query you suggested , but I got some error As:

"Conversion failed when converting the varchar value '01-4-' to data type int."

Hai ,
I have 2 tables

  1. [B]Transport_Details [/B]having columns
    user_id
    FareStageId
    StartDate
    EndDate

and

  1. [B]Route_Fee [/B]having columns
    FareStageId
    monthId
    fees

I need to get a monthwise list by passing monthid.
But my problem is that , if start date and enddate of a user are 02-08-2011 and
20-02-2012 and I need to get the list of 4th month , this user also listed.

Query I used is:

[ICODE]select Transport_Details.User_Id, Route_Fee.Fee, from Transport_Details join Route_Fee
on Transport_Details.Bus_Route_Fare_Stage_Id=Route_Fee.Bus_Route_Fare_Stage_Id where Route_Fee.Month=4[/ICODE]

Can i get the list of those users , the monthid between startdate and enddate.

Thanks in advance.

Hai ,
I tried it and wored correctly , But again a problem occured.
If the start date and end date are like 04-11-2011 and 04-04-2012 , then the months are 11 and 4 .Then incorrect records get.

Hai ,
Thanks fro your replay.

But I just pass only one value for monthId and I want to retrieve records only if that monthId exist between startdate and enddate.

Hai ,

I have a table Student_transport_Details having columns :

UserId
DesignatonId
StartDate
Enddate

I need to get records for a particular month.
Can i retrieve records by passing MonthId [between 1 -12].

Thanks in advance

Hai ,
the code i used is:
[CODE]protected void lnkStudentPDF_Click(object sender, EventArgs e)
{
SchoolCommon ObjCommon = new SchoolCommon();
try
{
GrdStudent.AllowPaging = false;
DataTable dt = (ViewState["StudentList"]) as DataTable;
GrdStudent.DataSource = dt;
GrdStudent.DataBind();

            GrdStudent.Columns[2].Visible = false;
            ObjCommon.ExportToPDFnewFormat_WithButtons(GrdStudent, true, "Student Report", 6);
        }

        LblErr.Text = "Successfully Exported";
    }

    catch (System.Threading.ThreadAbortException lException)
    {

        // do nothing

    }

    finally
    {
        GrdStudent.Columns[2].Visible = true;
    }
}

[/CODE]
[CODE]
public void ExportToPDFnewFormat_WithButtons(GridView gvReport, bool LandScape, string strHeader, int iColoumnNo)
{

        int noOfColumns = 0, noOfRows = 0;
        DataTable tbl = null;
        gvReport.AllowPaging = false;
        if (gvReport.AutoGenerateColumns)
        {
            tbl = gvReport.DataSource as DataTable; // Gets the DataSource of the GridView Control.
            noOfColumns = tbl.Columns.Count;
            noOfRows = tbl.Rows.Count;
        }
        else
        {
            // noOfColumns = gvReport.Columns.Count;
            noOfColumns = iColoumnNo;
            noOfRows = gvReport.Rows.Count;
        }

        float HeaderTextSize = 14;
        float ReportNameSize = 16;
        float ReportTextSize = 12;
        float ApplicationNameSize = 10;

        // Creates a PDF document

        Document document = null;
        if (LandScape == true)
        {
            // Sets the document to A4 size and rotates it so that the     orientation of the page is Landscape.
            document = new Document(PageSize.A4.Rotate(), 0, 0, 15, 5);
        }
        else
        {
            document = new Document(PageSize.A4, 0, 0, 15, 5);
        }

        // Creates a PdfPTable with column count of the table equal to no of columns of the gridview or gridview datasource.
        iTextSharp.text.pdf.PdfPTable mainTable = new iTextSharp.text.pdf.PdfPTable(noOfColumns);

        // Sets the first 4 rows of the table as the header rows which will be repeated in all the pages.
        mainTable.HeaderRows = 4;

        // Creates a PdfPTable with ...

Hai ,

is there any solution for this problem.

Thanks in advance.

Hai ,
Thanks for your reply and i got it.

Hai ,

I used gridview for student list , and export it to pdf.
But the 2nd column is not need to export. I make the gridview's 2'nd column visible false.
[CODE]
GrdStudent.Columns[2].Visible = false;
[/CODE]

But pdf file contain this column. Can you help me to solve it.

Regards,
sreevidya

Hai ,
Thanks for yuor replay,
But in which place i add the OUTPUT.

Hai,

I got it lcorrectly ,I Added trigger before closing the </asp:UpdatePanel> tag

<Triggers>
    <asp:PostBackTrigger ControlID="lnkStudentPDF" />
    <asp:PostBackTrigger ControlID="lnkStudentExcel" />
</Triggers>

Hai ,
Thank you for your replay.
I execute the sp successfully , But how can i get the @RET as output.

Hai ,
I have gris fro student listing. And I need to export this list to pdf.
But i get the error msg like:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '%PDF-1.4
%??3 0 obj '.

The code i used is:
[ICODE] protected void lnkStudentPDF_Click(object sender, EventArgs e)
{
SchoolCommon ObjCommon = new SchoolCommon();
try
{
GrdStudent.AllowPaging = false;
DataTable dt = (ViewState["StudentList"]) as DataTable;
GrdStudent.DataSource = dt;
GrdStudent.DataBind();

        GrdStudent.Columns[6].Visible = false;
        GrdStudent.Columns[7].Visible = false;
        GrdStudent.Columns[8].Visible = false;

        ObjCommon.ExportToPDFnewFormat_WithButtons(GrdStudent, true, "Student Report",6);           
        LblErr.Text = "Successfully Exported";
    }
   catch (Exception ex)
    {
        LblErr.Text = "Export Failed";
    }

    finally
    {
        GrdStudent.Columns[6].Visible = true;
        GrdStudent.Columns[7].Visible = true;
        GrdStudent.Columns[8].Visible = true;
    }
}[/ICODE]

[ICODE] public void ExportToPDFnewFormat_WithButtons(GridView gvReport, bool LandScape, string strHeader, int iColoumnNo)
{

        int noOfColumns = 0, noOfRows = 0;
        DataTable tbl = null;
        gvReport.AllowPaging = false;
        if (gvReport.AutoGenerateColumns)
        {
            tbl = gvReport.DataSource as DataTable; // Gets the DataSource of the GridView Control.
            noOfColumns = tbl.Columns.Count;
            noOfRows = tbl.Rows.Count;
        }
        else
        {
            // noOfColumns = gvReport.Columns.Count;
            noOfColumns = iColoumnNo;
            noOfRows = gvReport.Rows.Count;
        }

        float HeaderTextSize = 14;
        float ReportNameSize = 16;
        float ReportTextSize = 12;
        float ApplicationNameSize = 10;

        // Creates a PDF document

        Document document = null;
        if (LandScape == true)
        {
            // Sets the document to A4 size and rotates it so that the     orientation ...

Hai,

I Have an sp like this:
[CODE]ALTER procedure [dbo].[SP_ClassInsertion]
@ClassType varchar(50),
@ClassTypeId varchar(50),
@ClassName varchar(50),
@SchoolId varchar(50),
@ClassID varchar(50),
@BatchId varchar(50),
@Userid uniqueidentifier,
@ClassCategoryId varchar(50),
@SchoolClassCategoryId varchar(50)

as

declare @STATUS int

begin
if exists(select Class_Id from SCH_Class where Class_Name=@ClassName and School_Id=@SchoolId and Is_Valid=1)
begin
set @STATUS=0
end

else
begin

insert into SCH_Class (Class_Id,Class_Type_Id,Batch_Id,School_Id,Class_Name,Created_Date,Updated_Date,Created_By,Updated_By,Is_Valid) values (@ClassID,@ClassTypeId,@BatchId,@SchoolId,@ClassName,GetDate(),GetDate(),@Userid,@Userid,1)

set @STATUS=1

return @STATUS
end

[/CODE]

Can u please help me to execute this sp and get the return value from it.

Regards,
sreevidya

Hai ,
Thank you for your replay.

I got it correctly when running the application after cleared the history and as you said i didnt used the tag.

Hai ,

I have a gridview containing datalist in it.In the datalist i placed 2 labels.
My problem is that the content of the datalist not placed within a gridview row cell.
The design and css used is:
[CODE]


[/CODE]
[CODE].datalisthead
{
width:150px;
height:auto;
border-right:1px;
border-right-color:Black;
border-right-style:solid;
}[/CODE]

Thanks in advance,
Sreevidya

Hi,

I Need to implement transaction with two databases. I used LINQ for one database and normal connection for other. The code I used in Buiseness Layer like:
[CODE] using (TransactionScope scope = new TransactionScope())
{
try
{
DataContext ObjSchool = new DataContext();
MEMLiB ObjMemberships = new MEMLiB();

            ObjSchool.SCH_Students.InsertOnSubmit(ObjSCH_Student);   
            ObjSchool.SubmitChanges();
            if(ObjMembership.MEM_NO!=null)
                ObjMemberships.Fn_Insert_Membership(ObjMembership);
            scope.Complete();
            return true;
        }

        catch (Exception Ex)
        {
            string StrError = Ex.Message;
            return false;
        }
    }[/CODE]

but, even if some exeptions in second insertion , first insertion occured. How can i fix this problem.

Thanks in advance,

Sreevidya

hai ,
I used LINQ in application. I want to perform batch update.
For that i used the code as:
[CODE]
int[] istudentId = new int[];
int j = 0;
for (int i = 0; i < GrdStudent.Rows.Count; i++)
{
if ((GrdStudent.Rows[i].FindControl("chkSelect") as CheckBox).Checked)
{
istudentId[j] = ObjStudent.Student_Id;
j++;
}
}
DataContext ctx = new DataContext();
ctx.ExecuteCommand("update SCH_Student_Promotion_Master set Class_Id='" + DdlClassTo.SelectedValue + "' where Student_Id in('" + istudentId + "')", "", "");
[/CODE]

but i got some Error like:
Conversion failed when converting the varchar value 'System.Int32[]' to data type int.

Thanks in advance

Sreevidya

hai,
I used FCKEditor in my Application. But when i browse the server any time i get a error window. And the Error as follows:

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /SchoolAdmin/fckeditor/editor/dialog/~/fckeditor/

How Can I fix this problem.

Thanks in Advance,
Sreevidya

I have downloaded the fckeditor dll and added reference in my project.
and modified the fckconfig.js file in the editor floder and
modified the web.config file as said in the tutorials..Now the problem is that
while compiling the project as error coming as >
--Could not load the file 'FredCK.FCKeditorV2.FileBrowser.Config'

somebody please sugest a solution ...

Hai,
I used FCK Editor -FredCK.FCKeditorV2.dll on my aspx page.
But neednt Some of the toolbars . Can I remove from this editor.

Thanks in Advance,

Sreevidya

hai,
I have a datalist that contain image button control and i bind images from folder to it.
I need to get image slide show when clicking on an image. How can I implement it.

Thanks in advance,
sreevidya.