|
There are multiple way to display reports. You have to write simple SQL SP'S which will return you the required output, the Display it on GridView or Repeater Control . Even you can use XSL to render it on your page.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
What defines the income / expenditure to be on the same line ?
Is it a date? For example: April 15th, 2009: Income: $500, Expense: $200
Also, is there always a match between income and expense on the same day?
Example 2: May 1: Income $200, no expense or No income, $50 expense.
This would determine how the SQL query is structured.
|
|
|
|
|
Hi
I caught in problem since 3 days. Try lot of stuff not able to solve the problem. I developed a form for inventory project - Product.aspx. It has option to add category, subcategory, company on the fly just clicking the add new button. When user press add new, pop appears to ask information and theres save button.
Save button has code to save all data in database tables. But click event do not fire for all these buttons. Look at the form: http://www.artinarts.in/ecomm/admin/product.aspx. Dont know where's the problem.
I read some-where remove all validators and remove un-neccessary updatepanels. I did same but no use. I also read somewhere use aync="true" in page directive. still it not work. I also read that use <triggers> in update panel still not successfull. Please guide me what to do.
My Product.aspx file is as:
<%@ Page Title="" Language="VB" MasterPageFile="MasterPage.master" AutoEventWireup="false" CodeFile="Product.aspx.vb" Inherits="admin_Product" Async="true" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.style1
{
width: 105%;
}
.style7
{
width: 89px;
}
.style8
{
width: 279px;height: 30px;
}
.style9
{
width: 304px;height: 30px;
}
.style11
{
width: 123px;
}
.style12
{
height: 30px;
}
.style14
{
width: 304px;
}
.style15
{
width: 279px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<h3 style="font-family:Verdana" id="lblNoProducts">
Add new Product</h3>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table class="style1">
<tr>
<td valign="top" class="style15">
Category</td>
<td valign="top" class="style14">
<asp:DropDownList ID="lstCategory" runat="server" AutoPostBack="True">
<asp:ListItem>Primary</asp:ListItem>
</asp:DropDownList>
</td>
<td valign="top">
<asp:Button ID="Button1" runat="server" Text="New Category" Height="23px"
Width="121px" UseSubmitBehavior="False" />
<cc1:PopupControlExtender ID="Button1_PopupControlExtender" runat="server"
TargetControlID="Button1" PopupControlID="pnlCategory" Position ="Right"
>
</cc1:PopupControlExtender>
<asp:Panel ID="pnlCategory" Width="396px" Height="59px" runat="server"
BackColor="LightYellow">
Category :
<asp:TextBox ID="txtCategory" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label ID="lblCatError" runat="server" ForeColor="#FF3300"></asp:Label>
<br />
<asp:Button ID="Button2" runat="server"
Text="Save" OnClick="Button2_Click" />
</asp:Panel>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Sub Category</td>
<td class="style14" valign="top">
<asp:DropDownList ID="lstSubCategory" runat="server">
<asp:ListItem>Primary</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:Button ID="Button3" runat="server" Text="New Sub-category" Height="24px"
Width="122px" UseSubmitBehavior="False" />
<cc1:PopupControlExtender ID="Button3_PopupControlExtender" runat="server"
TargetControlID="Button3" PopupControlID="pnlSubCategory"
Position ="Right">
</cc1:PopupControlExtender>
<asp:Panel ID="pnlSubCategory" Width="440px" Height="82px" runat="server"
BackColor="LightYellow">
<table class="style1">
<tr>
<td class="style7">
Category</td>
<td>
<asp:DropDownList ID="drpCat" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style7" valign="top">
Sub-Category</td>
<td valign="top">
<asp:TextBox ID="txtSubCat" runat="server" MaxLength="20"></asp:TextBox>
<asp:Label ID="lblSubCatError" runat="server" ForeColor="#FF3300"></asp:Label>
<br />
<asp:Button ID="Button5" runat="server" Height="23px" Text="Save" />
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td class="style8" valign="top">
Company</td>
<td class="style9" valign="top">
<asp:DropDownList ID="lstCompany" runat="server">
<asp:ListItem>Primary</asp:ListItem>
</asp:DropDownList>
</td>
<td class="style12" valign="top">
<asp:Button ID="Button6" runat="server" Height="23px" Text="New Company"
Width="126px" UseSubmitBehavior="False" />
<cc1:PopupControlExtender ID="Button6_PopupControlExtender" runat="server"
DynamicServicePath="" Enabled="True" ExtenderControlID="" Position ="Right"
TargetControlID="Button6" PopupControlID="pnlCompany">
</cc1:PopupControlExtender>
<asp:Panel ID="pnlCompany" Width="460px" Height="187px" runat="server"
BackColor="LightYellow">
<table class="style1">
<tr>
<td class="style7">
Company</td>
<td class="style11">
<asp:TextBox ID="txtCompany" runat="server" MaxLength="20"></asp:TextBox>
</td>
<td>
<asp:Label ID="lblCompError" runat="server" ForeColor="#FF3300"></asp:Label>
</td>
</tr>
<tr>
<td class="style7">
Address</td>
<td class="style11">
<asp:TextBox ID="txtCAddress" runat="server" MaxLength="50"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style7">
City</td>
<td class="style11">
<asp:TextBox ID="txtCity" runat="server" MaxLength="20"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style7">
State</td>
<td class="style11">
<asp:TextBox ID="txtState" runat="server" MaxLength="20"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style7">
Contact No</td>
<td class="style11">
<asp:TextBox ID="txtContact" runat="server" MaxLength="15"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style7">
Email</td>
<td class="style11">
<asp:TextBox ID="txtEmail" runat="server" MaxLength="25"></asp:TextBox>
</td>
<td>
</td>
</tr>
</table>
<asp:Button ID="Button7" runat="server"
Text="Save" Height="24px" Width="58px" />
</asp:Panel>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Price</td>
<td class="style14" valign="top">
<asp:TextBox ID="txtPrice" runat="server" MaxLength="10"></asp:TextBox>
</td>
<td>
Currency:
<asp:DropDownList ID="lstCurrency" runat="server" Font-Size="10pt">
<asp:ListItem>INR</asp:ListItem>
<asp:ListItem>USD</asp:ListItem>
<asp:ListItem>EURO</asp:ListItem>
<asp:ListItem>UK POUND</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Product</td>
<td class="style14" valign="top">
<asp:TextBox ID="txtProduct" runat="server" MaxLength="70"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Opening Stock</td>
<td class="style14" valign="top">
<asp:TextBox ID="txtOpnStock" runat="server">0</asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Unit of Measurement</td>
<td class="style14" valign="top">
<asp:DropDownList ID="lstUnits" runat="server">
<asp:ListItem>Number</asp:ListItem>
<asp:ListItem>KG</asp:ListItem>
<asp:ListItem>Gram</asp:ListItem>
<asp:ListItem>ML</asp:ListItem>
<asp:ListItem>Litre</asp:ListItem>
<asp:ListItem>Box</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:Button ID="Button10" runat="server" Text="Add New"
UseSubmitBehavior="False" />
<cc1:PopupControlExtender ID="Button10_PopupControlExtender" runat="server"
DynamicServicePath="" Enabled="True" ExtenderControlID=""
TargetControlID="Button10" PopupControlID="pnlUM" Position="Right" >
</cc1:PopupControlExtender>
<asp:Panel ID="pnlUM" Width="460px" Height="57px" runat="server"
BackColor="LightYellow">
Unit:
<asp:TextBox ID="txtUnit" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label ID="lblErrorUnit" runat="server" ForeColor="#FF3300"></asp:Label>
<br />
<asp:Button ID="Button11" runat="server" Text="Save" />
</asp:Panel>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Description</td>
<td class="style14" valign="top">
<asp:TextBox ID="txtDescription" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Upload Big Image<br />
(500 X 500 px)</td>
<td class="style14" valign="top">
<asp:FileUpload ID="FileUpload1" runat="server" />
</td>
<td valign="top">
</td>
</tr>
<tr>
<td class="style15" valign="top">
Upload Thumbnail<br />
(100 X 100 px)</td>
<td class="style14" valign="top">
<asp:FileUpload ID="FileUpload2" runat="server" />
</td>
<td valign="top">
</td>
</tr>
<tr>
<td class="style15" valign="top">
Weight</td>
<td class="style14" valign="top">
<asp:TextBox ID="txtWeight" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style15" valign="top">
Weight-Unit</td>
<td class="style14" valign="top">
<asp:DropDownList ID="lstWgUnit" runat="server">
<asp:ListItem>Number</asp:ListItem>
<asp:ListItem>KG</asp:ListItem>
<asp:ListItem>Gram</asp:ListItem>
<asp:ListItem>ML</asp:ListItem>
<asp:ListItem>Litre</asp:ListItem>
<asp:ListItem>Box</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:Button ID="Button12" runat="server" Text="New Unit"
UseSubmitBehavior="False" />
<cc1:PopupControlExtender ID="Button12_PopupControlExtender" runat="server"
DynamicServicePath="" Enabled="True" ExtenderControlID=""
TargetControlID="Button12" PopupControlID="pnlUMW" >
</cc1:PopupControlExtender>
<asp:Panel ID="pnlUMW" Width="460px" Height="57px" runat="server"
BackColor="LightYellow">
Unit:
<asp:TextBox ID="txtUnitW" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label ID="lblErrorUnitW" runat="server" ForeColor="#FF3300"></asp:Label>
<br />
<asp:Button ID="Button13" runat="server" Text="Save" />
</asp:Panel>
</td>
</tr></table>
<table width="100%">
<tr>
<td class="style15" valign="top">
<asp:LinkButton ID="LinkButton1" runat="server">Show List</asp:LinkButton>
<cc1:PopupControlExtender ID="LinkButton1_PopupControlExtender" runat="server"
DynamicServicePath="" Enabled="True" ExtenderControlID="" Position ="Bottom"
TargetControlID="LinkButton1" PopupControlID="pnlGrid">
</cc1:PopupControlExtender>
<asp:Button ID="Button8" runat="server" Text="Add to List"
ValidationGroup="prd" />
<asp:Panel ID="pnlGrid" runat="server" Height="300" Width="500" BackColor="LightYellow">
<asp:GridView ID="GridView1" runat="server" Width="544px">
<Columns>
<asp:CommandField ShowDeleteButton="True" />
</Columns>
<EmptyDataTemplate>
There is no product in the list at present
</EmptyDataTemplate>
</asp:GridView>
</asp:Panel>
</td>
<td class="style14" valign="top">
</td>
<td>
</td>
</tr>
</table>
<p>
</p>
<p>No of Products added:
<asp:Label ID="lblNoItems" runat="server" Text="0"></asp:Label>
</p>
<p>
</p>
<p style="text-align: center">
<asp:Button ID="Button9" runat="server" Text="Save All" Width="126px" />
</p>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button5" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button7" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button13" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
Code behind: Product.aspx.vb
Imports System.Data
Imports System.Data.SqlClient
Imports System.Linq
Partial Class admin_Product
Inherits System.Web.UI.Page
Shared productTable As New DataTable("Products")
Shared srNo As Integer = 0
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
On Error Resume Next
If Not IsPostBack Then
productTable.Columns.Add(New DataColumn("SrNo"))
productTable.Columns.Add(New DataColumn("Category"))
productTable.Columns.Add(New DataColumn("SubCategory"))
productTable.Columns.Add(New DataColumn("Company"))
productTable.Columns.Add(New DataColumn("Product"))
productTable.Columns.Add(New DataColumn("OpeningStock"))
productTable.Columns.Add(New DataColumn("UnitsMeasurement"))
productTable.Columns.Add(New DataColumn("Weight"))
productTable.Columns.Add(New DataColumn("WeightUnit"))
productTable.Columns.Add(New DataColumn("Description"))
productTable.Columns.Add(New DataColumn("BigImagePath"))
productTable.Columns.Add(New DataColumn("ThumbnailPath"))
productTable.Columns.Add(New DataColumn("Price"))productTable.Columns.Add(New DataColumn("Currency"))
Category.fillCategories(lstCategory)
Category.fillSubCategories(lstSubCategory, lstCategory.SelectedValue)
Company.fillCompanies(lstCompany)
Category.fillCategories(drpCat)
Product.fillUnits(lstUnits)
Product.fillUnits(lstWgUnit)
End If
End Sub
Protected Sub Button9_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button9.Click
If productTable.Rows.Count >= 1 Then
For i As Integer = 1 To productTable.Rows.Count - 1
If Not Product.save(productTable.Rows(i)("Product").ToString(), _
Company.getID(productTable.Rows(i)("Company").ToString()), _
Category.getID(productTable.Rows(i)("Category").ToString()), _
Category.getSubCatID(productTable.Rows(i)("SubCategory").ToString()), _
productTable.Rows(i)("UnitsMeasurement").ToString(), _
productTable.Rows(i)("Price").ToString(), productTable.Rows(i)("Currency").ToString(), _
productTable.Rows(i)("OpeniningStock").ToString(), _
productTable.Rows(i)("Description").ToString(), _
productTable.Rows(i)("BigImagePath").ToString(), _
productTable.Rows(i)("ThumbnailPath").ToString(), _
productTable.Rows(i)("WeightUnit").ToString(), _
productTable.Rows(i)("Weight").ToString()) Then
End If
Next
End If
End Sub
Protected Sub Button8_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button8.Click
srNo = srNo + 1
Dim dr As DataRow = productTable.NewRow
dr(0) = srNo
dr(1) = lstCategory.SelectedValue
dr(2) = lstSubCategory.SelectedValue
dr(3) = lstCompany.SelectedValue
dr(4) = txtProduct.Text.ToUpper()
dr(5) = txtOpnStock.Text
dr(6) = lstUnits.SelectedValue
dr(7) = txtWeight.Text
dr(8) = lstWgUnit.SelectedValue
dr(9) = txtDescription.Text
dr(10) = FileUpload1.FileName
dr(11) = FileUpload2.FileName
dr(12) = txtPrice.Text
dr(13) = lstCurrency.SelectedValue
productTable.Rows.Add(dr)
GridView1.DataSource = productTable
GridView1.DataBind()
lblNoItems.Text = GridView1.Rows.Count
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim errMessage As String = ""
If Category.Save(txtCategory.Text.ToUpper(), errMessage) Then
Category.fillCategories(lstCategory)
Category.fillCategories(drpCat)
txtCategory.Text = ""
Else
lblCatError.Text = errMessage
End If
End Sub
Protected Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim errMessage As String = ""
If Category.SaveSubCategory(drpCat.SelectedValue, txtSubCat.Text.ToUpper(), errMessage) Then
Category.fillSubCategories(lstSubCategory, lstCategory.SelectedValue)
txtSubCat.Text = ""
Else
lblSubCatError.Text = errMessage
End If
End Sub
Protected Sub Button7_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.Click
Dim errMessage As String = ""
If Company.Save(txtCompany.Text.ToUpper(), txtCAddress.Text.ToUpper(), txtCity.Text.ToUpper(), txtState.Text.ToUpper(), txtContact.Text.ToUpper(), txtEmail.Text.ToUpper(), errMessage) Then
Company.fillCompanies(lstCompany)
txtCAddress.Text = ""
txtCity.Text = ""
txtContact.Text = ""
txtEmail.Text = ""
txtState.Text = ""
txtCompany.Text = ""
Else
lblCompError.Text = errMessage
End If
End Sub
Protected Sub lstCategory_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstCategory.SelectedIndexChanged
Category.fillSubCategories(lstSubCategory, lstCategory.SelectedValue)
End Sub
Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
productTable.Rows(e.RowIndex).Delete()
GridView1.DataSource = productTable
GridView1.DataBind()
End Sub
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
End Sub
Protected Sub Button11_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button11.Click
Dim errMessage As String = ""
If Product.SaveUnitMeasure(txtUnit.Text.ToUpper(), errMessage) Then
Product.fillUnits(lstUnits)
Product.fillUnits(lstWgUnit)
txtUnit.Text = ""
Else
lblErrorUnit.Text = errMessage
End If
End Sub
Protected Sub Button13_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button13.Click
Dim errMessage As String = ""
If Product.SaveUnitMeasure(txtUnitW.Text.ToUpper(), errMessage) Then
Product.fillUnits(lstUnits)
Product.fillUnits(lstWgUnit)
txtUnitW.Text = ""
Else
lblErrorUnit.Text = errMessage
End If
End Sub
End Class
Please help me to sort out the issue
|
|
|
|
|
Where you have hooked the event handlers? I can't see it on buttons markup. Also, don't dump your whole code. It makes the post unreadable. Please post only relevant part.
|
|
|
|
|
|
Hi,
this is from the tutorial site,
look through the code, and adapt yours like this,
<br />
<div class="demoarea"><br />
<div class="demoheading"><br />
PopupControl Demonstration</div><br />
Enter date for new reminder:<br />
<asp:TextBox ID="DateTextBox" runat="server" Width="80" autocomplete="off" /><br /><br />
<br /><br />
<asp:Panel ID="Panel1" runat="server" CssClass="popupControl"><br />
<asp:UpdatePanel runat="server" ID="up1"><br />
<ContentTemplate><br />
<center><br />
<asp:Calendar ID="Calendar1" runat="server" Width="160px" DayNameFormat="Shortest"<br />
BackColor="White" BorderColor="#999999" CellPadding="1" Font-Names="Verdana"<br />
Font-Size="8pt" ForeColor="Black" OnSelectionChanged="Calendar1_SelectionChanged"><br />
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" /><br />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" /><br />
<SelectorStyle BackColor="#CCCCCC" /><br />
<WeekendDayStyle BackColor="#FFFFCC" /><br />
<OtherMonthDayStyle ForeColor="#808080" /><br />
<NextPrevStyle VerticalAlign="Bottom" /><br />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" /><br />
<TitleStyle BackColor="#999999" Font-Size="7pt" BorderColor="Black" Font-Bold="True" /><br />
</asp:Calendar><br />
</center><br />
</ContentTemplate><br />
</asp:UpdatePanel><br />
</asp:Panel><br />
<ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" TargetControlID="DateTextBox"<br />
PopupControlID="Panel1" Position="Bottom" /><br />
Reminder message:<br />
<asp:TextBox ID="MessageTextBox" runat="server" Width="200" autocomplete="off" /><br /><br />
<br /><br />
<asp:Panel ID="Panel2" runat="server" CssClass="popupControl"><br />
<div style="border: 1px outset white; width: 100px"><br />
<asp:UpdatePanel runat="server" ID="up2"><br />
<ContentTemplate><br />
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"><br />
<asp:ListItem Text="Walk dog" /><br />
<asp:ListItem Text="Feed dog" /><br />
<asp:ListItem Text="Feed cat" /><br />
<asp:ListItem Text="Feed fish" /><br />
<asp:ListItem Text="Cancel" Value="" /><br />
</asp:RadioButtonList><br />
</ContentTemplate><br />
</asp:UpdatePanel><br />
</div><br />
</asp:Panel><br />
<ajaxToolkit:PopupControlExtender ID="PopupControlExtender2" runat="server" TargetControlID="MessageTextBox"<br />
PopupControlID="Panel2" CommitProperty="value" Position="Bottom" CommitScript="e.value += ' - do not forget!';" /><br />
<asp:UpdatePanel ID="UpdatePanel3" runat="server"><br />
<ContentTemplate><br />
<asp:Button ID="ReminderButton" runat="server" Text="Add reminder" OnClick="ReminderButton_Click" /><br />
<br /><br />
<br /><br />
<asp:Label ID="Label1" runat="server" Text="[No response provided yet]" /><br />
</ContentTemplate><br />
</asp:UpdatePanel><br />
</div><br />
Else try giving the save button a normal postback trigger.
|
|
|
|
|
Hi guys
I have an application that does something. It generates an XML document with 100-200 items. For each item there is an ID. I need to check if this ID exist in a table in a database. At the end of checking these ID a second XML document must be created with all the ID that was not present in the Database. There are two ways of doing this ( l prefer option 2 but my senior prefers option 1) What do you thing is the best approach.
Option 1:
Loop through each record in the XML and with each loop make a call to SQL server to check if this ID exist. If the ID does not exist build a list of the non existing ID in some form of collection whcih will later be used for creating the second XML document
Option 2:
Pass the XML document to SQL server, let SQL server do the checking against all the ID and then return an XML message of the ID that does not exist
Thanks
Neil
|
|
|
|
|
I vote for option 2. SQL server got good support for XML. You can supply a XMLReader which contains your XML and a transact SQL statement can loop through it and if the "id" does not exist in database, put it in a temporary table. Once you finish the loop, return the temporary table as XML (FOR XML AUTO ).
|
|
|
|
|
Option 2 works much faster for long run when you create CLR function in sqlserver.
Processing of compliled procedures and functions for multiple database read/write commands make it faster. If anybody goes for Option 1, then he may be good Desktop programmer without any knowledge of database and strength of PL/SQL
|
|
|
|
|
Option 3.
Return two result sets from SQL server.
Write a query to put all records in a table variable.
Write a second query with the id column via a join.
Return both sets to a dataset.
Use ADO.Net (such a datatable select method or rowfilter) to check for the id.
Then as you loop through your 100-200 records you don't need to hit sql server for each record, just search your datatable.
I didn't get any requirements for the signature
|
|
|
|
|
hi..
i have a problem in asp.net as follows..
question1
radiobutton1 radiobutton2
i.e.
if (Mydatareader.Read())
{
Label1.Text = rd[1].ToString();
RadioButton1.Text = rd[2].ToString();
RadioButton2.Text = rd[3].ToString();
}
now i want this code to be genrated 10 times in a .aspx.cs page. and after that how can i identify all those radiobuttons and question (displayed in label).as if i create thease contols in run time it is not differentiated by me.and if i create it desigen view i have to reapete all code (feathing from database ) for every set of controls(for every datarow).
Values of question and radiobutton fetchs from database.i want to check it on a button click from database .i want all this for a online paper..
can anyone send the code for it in c#..
thanks in advance
|
|
|
|
|
You should look into the asp:repeater control. Or try a gridview with a template column.
Each of these have an itemdatabound event where you can add code.
I didn't get any requirements for the signature
|
|
|
|
|
|
|
You will get a message board just down to that article. Please use that for discussions related to the article.
|
|
|
|
|
This Article is based on C# and Win Application, Then why are you putting it in ASP.Net forum.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
I have created a web service and i have created the msi file. I deployed the Web service in the IIS by running the msi file. If any exceptions occur during the WS call i want log the exceptions in to a file. I have given the file path in the web.config file. Until or unless i create a directory with write permission, its not creating the file in the mentioned path.
for ex: path : c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt
If the dont create the ErrorLog folder with write permission its showing the c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt denied message.
Is there any way to create directory with write permission through the c# code itself or the above is the only way to log the message.
Please help me.
With Regards,
Anand
|
|
|
|
|
anandhakrishnan wrote:
If the dont create the ErrorLog folder with write permission its showing the c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt denied message.
There are Two Solution for that.
1. If you are using IIS 6.0 or above, Create a separate Application Pool , Change the identity of Application to "Local System ", By default it is "Network Service", which is having minimum privilege on your system and that will not allow you to write on server. Change the Identity of Application Pool to "Local System", Assign the Application Pool to you virtual Directory.
Then Try. It will work
2. Give the Right Permission to All th user to that file.
I will suggest you to go for application pool.
Let me know if any other issue.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi
i have deployed on web site on local machine
but i am getting error because dll is not in gac how do i install that
|
|
|
|
|
nikhil1234 wrote: but i am getting error because dll is not in gac how do i install that
how to put assembly in gac
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hello Everybody
I need some suggestion about HTTP and HTTPS
I have bought some HTTPS space, so I can send customer to https for payments, login and register. For examples: When customer clicks Payments Button then it should be redirect to https://secure/mydomain/payment.aspx
As I know I have to send payments amount (£10.00)
Q1: What else I do need to send on https://secure/mydomain/payment.aspx from my http://mydomain.co.uk
Q2: After payment confirmation how do I know which customer make payment?
As I bought the package of PayPal Web Payments Pro so customer will make payments from my website.
So far what I have done is:
1.When customer click login then it goes to https
2.After login successful I have kept customer on https not redirect to http (I know its not a good idea)
I am waiting for your wise suggestion
Thnaks in Advance
Sarfarj Ahmed
|
|
|
|
|
I have Downloaded a source code for this proble but when i run this application on my PC it is giving an error that
"Element ModalUpdateProgress is not a known Element. This can occur if there is a compilation error in the website"
So, I am not able to understand why it is giving such a problem?
Does anybody know the solution for this?????????
Please help me...
|
|
|
|
|
Niungareamit wrote: Element ModalUpdateProgress is not a known Element. This can occur if there is a compilation error in the website"
Which Framework Version do you have? Do you have AJAX/AJAX Toolkit installed in you system?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
sir,I have Ajax Toolkit installed in my system..
|
|
|
|
|
I am a beginner and i want to learn asp.net using c# language.i am working in a IT dept.plz guide me step by step process to be proficient in c#.
|
|
|
|