|
I'm not sure I follow - you're storing a file stream on the server side between pages ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You have the following choices:
1. Use a Session.
2. Save to a temporary database area and then apply the changes to the master tables at the end.
3. Use panels instead.
4. Resign and take up yak milking.
Based on your inability to articulate your problems with proposed solutions I would suggest option 4.
|
|
|
|
|
I have reevaluated the entire process.
I've decided to utilize the file stream object and have them edit their entire page.
Now, I have to figure out how to reiterate thru these modifed forms to place thae data into the db.
|
|
|
|
|
I'm trying to get a DIV to display at will, as a sort of dialog, but I'm stuck on setting the visibility as follows. Please could someone suggest why this isn't working:
<br />
function showSearchAndReplace()<br />
{<br />
var dSr = document.getElementById("divSR");<br />
dSr.style.display="inline";<br />
debugger; <br />
return true;<br />
}<br />
My DIV is marked up as:
div id="divSR" style="display: none;"
Last modified: 2hrs 53mins after originally posted --
|
|
|
|
|
I want to bind column name to a dropdownlist.
For ex. A table contains 3 columns "first name", "last name" and "address".
I want to bind those columns to a dropdownlist.I mean to say that that column should appear in the dropdownlist.(i am binding column by Store procedure.).
Can you suggest me how it can be done.
Regars.
Pranav Dave
|
|
|
|
|
You can only bind one of the columns, not all three to the same dropdown, unless you concatenate them in your stored proc, or elsewhere prior to binding.
only two letters away from being an asset
|
|
|
|
|
Hi Developers
I want to cache page's header and footer(which are infact two different user controls) on client's browser. . . !
Any suggestion is this regard..?
|
|
|
|
|
Hi.
I need help reading a file which is created via memory stream.
I know how to read a file (in byte array form) and write to memory stream, but i need to attach this file from the memory stream and email it.
I am doing this to remove the hassles of reading and writing files to disk.
Any help is greatly appreciated.
Thanks
|
|
|
|
|
Just create the attachment from the stream:
Attachment a = new Attachment(theMemoryStream);
The constructor also has overloads so that you can specify file name and mime type.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks, I just found that out.
|
|
|
|
|
Hi All,
I am working with ASP.NET 3.5 (C#) with AJAX. I have a Master Page on which there r horizontal menus. One of the Menu is Search Company which has text box and 2 buttons. First Button Click it pop ups panel which has 3 cascading dropdownlist namely Country, Sector and Sub Industry. Search Company has functionality of either type the name of the Company in the Textbox or filter it from dropdownlist.
I have written Web Service from which data is fetched. Web Service also has 2 functions Auto Complete Extender.
I have a Web User Control which is link to Master Page. This User Control has again have the same search Company mentioned above, but this all is dynamically created on web user control.
Now the problem what I have facing is that I am storing Country Id, Sector ID and Sub Industry ID in Session and in both the text box I get the same company which I don't want. If I am doing filtering part in Master page then its should not reflect on web user control and vice versa.
Someone please help me out with this....
Thanks in advance....
|
|
|
|
|
Hi all,
I am using ajax 1.0 ,asp.net2.0 , C#.
I used nested updatepanel so that only part of page get refereshed but my problem is whole page is getting referesh or flicker(whole page goes off that is no control is visible then it comes back with control and data ) on every event(like seletedindexchaged event)
I here encloesed the code please help
<%@ Page Language="C#" MasterPageFile="~/DailyCallReport/Master2.master" AutoEventWireup="true" CodeFile="Dcr.aspx.cs" Inherits="DailyCallReport_Dcr" Title="Daily Call Report" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">
<h2 style ="text-align :center ;" ><asp:Label ID="headername" Font-Size ="12pt" runat="server" Text="D a i l y C a l l R e p o r t"></asp:Label>
</h2>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel id="UpdatePanelmain" ChildrenAsTriggers ="true" UpdateMode ="Conditional" runat="server">
<ContentTemplate>
<asp:Panel ID="MAINPANEL" runat="server" Width= "815 px" BackColor="#FFFFFF" HorizontalAlign = "Left">
<table border = 0 >
<tbody >
<tr style ="background-color:#85C8D0 " align ="left" >
<TD style="WIDTH: 100px; BORDER-BOTTOM: gray 1px solid; height: 28px;" align=right >
<asp:Label id="Label3" runat="server" Text="Day Type" Font-Size="9pt" SkinID="LABEL_Navy_Simple"></asp:Label>
</TD>
<TD style="BORDER-BOTTOM: gray 1px solid; TEXT-ALIGN: left; width: 180px; height: 28px;">
<asp:DropDownList id="Ddldatetype" runat="server" Width="165px" Font-Bold="False" Font-Size="9pt" Font-Names="Arial" SkinID="DROPDOWNLIST_LONG" >
</asp:DropDownList>
</TD>
<td style ="width:280px;" >
</td>
<TD style="WIDTH: 58px; BORDER-BOTTOM: gray 1px solid; height: 28px;" align=right>
<asp:Label id="Label2" runat="server" Text="Date" Font-Size="9pt" Font-Names ="Arial" SkinID="LABEL_Navy_Simple"></asp:Label>
</TD>
<TD style="BORDER-BOTTOM: gray 1px solid; TEXT-ALIGN: left; width: 180px; height: 28px;">
<asp:TextBox ID="Txtreportingdt" runat="server" SkinID ="Textbox"></asp:TextBox>
</TD>
</tr>
</tbody>
</table>
<table border = 1 >
<tbody >
<TR style ="background-color :#B1CCDF" >
<asp:UpdatePanel id="UpdatePanel1" ChildrenAsTriggers ="False" UpdateMode ="Conditional" runat="server">
<ContentTemplate>
-- some code here
</ContentTemplate>
</asp:UpdatePanel>
</tbody>
</table>
<table >
<tbody >
</TR>
<tr style ="background-color :#B1CCDF" >
<TD style="WIDTH: 58px; BORDER-BOTTOM: gray 1px solid; height: 26px;" align=right>
<asp:Label id="Label5" runat="server" Text="Hospital" Font-Size="9pt" SkinID="LABEL_Navy_Simple"></asp:Label>
</TD>
<TD style="BORDER-BOTTOM: gray 1px solid; TEXT-ALIGN: left; width: 250px; height: 26px;">
<asp:DropDownList id="DDLhosp" runat="server" Width="240px" Font-Bold="False" Font-Size="9pt" Font-Names="Arial" AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="DDLhosp_SelectedIndexChanged" ></asp:DropDownList>
</TD>
<TD style="WIDTH: 58px; BORDER-BOTTOM: gray 1px solid; height: 26px;" align=right>
<asp:Label id="Label6" runat="server" Text="Customer" Font-Size="9pt" SkinID="LABEL_Navy_Simple"></asp:Label>
</TD>
<TD style="BORDER-BOTTOM: gray 1px solid; TEXT-ALIGN: left; width: 230px; height: 26px; " colspan = "3">
<asp:DropDownList id="Ddlcust" runat="server" Width="220px" Font-Bold="False" Font-Size="9pt" Font-Names="Arial" AppendDataBoundItems="True" AutoPostBack="True" ></asp:DropDownList>
</TD>
<TD style="BORDER-BOTTOM: gray 1px solid; TEXT-ALIGN: left; width: 132px; height: 26px;">
<asp:CheckBoxList ID="CheckBoxList1" runat="server" Width = "125 px" Font-Names ="Arial" Font-Size ="9 pt" OnSelectedIndexChanged = CheckBoxList1_SelectedIndexChanged AutoPostBack ="true" RepeatDirection="Horizontal">
</asp:CheckBoxList>
</TD>
<TD style="WIDTH: 58px; BORDER-BOTTOM: gray 1px solid; height: 26px;" align="center" >
<%--<asp:Label id="Label11" runat="server" Text="Worked With" Font-Size="9pt" SkinID="LABEL_Navy_Simple"></asp:Label>--%>
<asp:ImageButton ID="Imgbtnworked" runat="server" ImageUrl="~/DailyCallReport/FrameImg/icon/Users26X26.gif" AlternateText="Worked With" /></td>
</TD>
</tr>
</tbody>
</table>
<!-- SECOND TABLE -->
<asp:UpdatePanel id="UpdatePanel5" ChildrenAsTriggers ="true" UpdateMode ="Conditional" runat="server">
</ContentTemplate>
<asp:UpdatePanel id="UpdatePanel2" ChildrenAsTriggers ="true" UpdateMode ="Conditional" runat="server">
<ContentTemplate>
some control code here
</ContentTemplate>
</asp:UpdatePanel>
</tr>
<tr style ="background-color :#C0E3DD">
<asp:UpdatePanel id="UpdatePanel3" ChildrenAsTriggers ="true" UpdateMode ="Conditional" runat="server" >
<ContentTemplate >
---some control here
</ContentTemplate>
</asp:UpdatePanel>
</tr>
<tr style ="background-color :#C0E3DD" >
<asp:UpdatePanel id="UpdatePanel4" ChildrenAsTriggers ="true" UpdateMode ="Conditional" runat="server">
<ContentTemplate>
<some control here>
</ContentTemplate>
</asp:UpdatePanel>
</tr>
<tr style ="background-color :#85C8D0 ">
<TD style="BORDER-BOTTOM: gray 1px solid; TEXT-ALIGN:center ; " colspan ="4" >
<asp:Button ID="Button1" runat="server" SkinID ="BUTTON_LONG" Text="Save Draft" OnClick="Button1_Click1" />
<asp:Button ID="Btncancel" runat="server" OnClick="Btncancel_Click" Text="Cancel" />
</TD>
</tr>
</tbody>
</table>
<table style="width: 814px" >
<tbody >
<tr>
</tr>
<tr>
<td style="width: 825px" >
<asp:Panel ID = "gridpanel" runat="server" Width="800 px" Height="175px" ScrollBars="Both" BorderWidth="1px" BorderStyle="Solid" BorderColor="#99CCCC">
<asp:GridView ID="Grdmain" Width ="806px" AutoGenerateColumns="False" CellPadding="4" DataKeyNames ="DocTORcode"
BackColor ="#C0E3DD" runat="server" OnRowDataBound="grdmain_rowDataBound" OnRowDeleting="grdmain_RowDeleting" OnRowEditing="grdmain_RowEditing">
</asp:GridView>
</asp:Panel>
</td>
</tr>
<tr style ="background-color :#85C8D0 ">
<td style="height: 13px; width: 825px;">
<asp:ImageButton ID="btnclose" runat="server" OnClientClick ="javascript: return confirm('Do you want to delete the record?');" OnClick="btnclose_Click" Width="84px" AlternateText="Close the Day" Height="47px" /></td>
</tr>
</tbody>
</table>
<asp:HiddenField ID="HiddenField1" runat="server" />
</asp:Panel>
<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender1" BorderColor = "#C0E3DD" runat="server" TargetControlID="MAINPANEL" Radius="20" >
</ajaxToolkit:RoundedCornersExtender>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
regards
imran khan
|
|
|
|
|
hi
i want datarelation between 3 tables.
i am using asp.net with c#.
my code is---
but i didn't know about binding the data in farpoint spreadsheet.
-------------------------------------------------------------------------
public DataSet funFillDataset()
{
SqlDataAdapter sqlDaSector;
SqlDataAdapter sqlDaAsset;
SqlDataAdapter sqlDaSectorAsset;
SqlConnection sqlcon = new SqlConnection("Data Source=COMP3\\TIPL1;Initial Catalog=eERS;User ID=gayatri; Password=gayatri");
sqlcon.Open();
sqlDaSector = new SqlDataAdapter();
SqlCommandBuilder cmdbuild = new SqlCommandBuilder(sqlDaSector);
ds = funGetDataSet(ds, sqlcon, sqlDaSector, "select * from tSectorMaster", "tSectorMaster");
sqlDaSectorAsset = new SqlDataAdapter();
ds = funGetDataSet(ds, sqlcon, sqlDaSectorAsset, "select * from tAssetSectorMap", "tAssetSectorMap");
sqlDaAsset = new SqlDataAdapter();
ds = funGetDataSet(ds, sqlcon, sqlDaAsset, "select * from tAssetMaster", "tAssetMaster");
sqlcon.Close();
return ds;
}
public DataSet funGetDataSet(DataSet ds,SqlConnection sqlcon , SqlDataAdapter sqlDA, string query, string tablename)
{
//sqlcon.Open();
sqlDA.SelectCommand = new SqlCommand(query, sqlcon);
sqlDA.Fill(ds, tablename);
return ds;
}
void CreateDataRelations(ref DataSet ds)
{
DataColumn childCol;
DataRelation rel;
DataColumn parentCol;
parentCol = ds.Tables["tSectorMaster"].Columns["SectorCode"];
childCol = ds.Tables["tAssetSectorMap"].Columns["SectorCode"];
rel = new DataRelation("AssetSectorMap1", parentCol, childCol);
rel.Nested = true ;
ds.Relations.Add(rel);
DataColumn parentCol, childCol;
parentCol = ds.Tables["tAssetSectorMap"].Columns["AssetCode"];
childCol = ds.Tables["tAssetMaster"].Columns["AssetCode"];
rel = new DataRelation("AssetSectorMap_AssetMaster", parentCol1, childCol1);
rel.Nested = true;
ds.Relations.Add(rel);
}
private void bindDataset(ref DataSet ds)
{
FpSpread1.DataSource = ds;
FpSpread1.DataBind();
FpSpread2.DataSource = ds;
FpSpread2.DataBind();
}
this is my code but its not run.
pls tell me write code.
arya
|
|
|
|
|
|
i didn't understand.
pls help me.
i am new in asp.net 2.0
arya
|
|
|
|
|
He IS helping you. If you can't articulate your problem clearly, we can't help much.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks for reply
sir actually i am using asp.net with c#.
in my web application i take farpoint spreadsheet control.
On that control i want treeview.
-SectorName
Aggriculture
Company name
NagarjunFertilizer
Auto
TataMotors
Honda
IT
Infosys
Wipro
like this Treeview i want on farpoint spreadsheet.
i have 3 tables
1.tSectorMaster
SectorCode(PK)
Description
2.tAssetMaster
AssetCode(PK)
Descriptionlong
3.tAssetSectorMap
AssetSectorCode(PK)
SectorCode(FK)
AssetCode(FK)
and i want
SectorName
Description
Descriptionlong
Description
Descriptionlong
Descriptionlong
Description
Descriptionlong
Descriptionlong
|
|
|
|
|
Hi
I have the following bit of code, basically i am selecting a value from a datbase which is showing as 12.00
DateTime dtlogtime = Convert.ToDateTime(readerdate);
if (dttimenow.AddMinutes(1) > dtlogtime)
{
}
the readerdate is a string and is the value from the database
but i get the error message: String was not recognized as a valid DateTime.
any help would be great
thanks
|
|
|
|
|
Hi
To me it seems "readerdate" is data reader object. if so ,Convert.ToDatetime does not take a reader obejct as input. Select a pecific column of the reader object what I mean is something like this,
<br />
int i=0;<br />
DateTime dtlogtime = Convert.ToDateTime(readerdate[i]);<br />
if (dttimenow.AddMinutes(1) > dtlogtime)<br />
{<br />
}<br />
<br />
Thanks,
Arindam D Tewary
|
|
|
|
|
hi
readerdate being the string value from the database
sorted it
DateTime dtlogtime = Convert.ToDateTime(readerdate);
if (dtlogtime.AddMinutes(1) < dttimenow)
cheers
|
|
|
|
|
Try DateTime.Parse
only two letters away from being an asset
|
|
|
|
|
Hello friends
my question is
How to add a checkbox conrol to datalist or datagrid in single cell(2,2)
thanking you
sam
Final year student of MCA
|
|
|
|
|
U can add that on ItemDataBound Event of DataGrid....
|
|
|
|
|
I am creating application using asp.net and c# and Oracle 10G as database. I am using Nhibernate
When I execeute from query from my page query first time it works fine and also do its job but in the same session if i try to run the same query it is giving me an exception which is
“From Keyword exception”.
The query is written on Command button using a Command button.
I have debugged the code and from the command object I pick up the query and run into SQL developer its running fine.
I also assure as Nhibernate session is also closed.
I also try Global.asax to close the Nhibernate Session.
To start with it looks like session problem which i tried to knock out by closing session, reader, object and also disposing command object.
Any suggestion to resolve this .
Thanks
Waqas
|
|
|
|
|
Dear Friends,
i have created one grid with servral controls on it now i am accessing the data of that control using GridView.FindControl("ControlName") method which is return me the control to access the data but each time i have to follow the process of providing ("ControlName") of that control. Instead of that i want to create an class which can take the gridview as input and provide me the output as "ControlName = ControlValue" as an collection which can be easy to integrate with my Database class can anyone guide me how can i access the control at run time and store the value in my collection
or is there another simple way if any please provide me.
thanks in advance.
Sasmi
|
|
|
|