|
I'm not sure I understand your question or why a master page would be initialized if not included or being referenced in some way.
In any event, the best advice I could give at this moment would be to handle the null/expected values in all of your controls - that in general is a good programming practice.
|
|
|
|
|
Visual Studio .NET 2003 comes with version 8 of Crystal Reports. If I were to buy the complete package of Crystal Reports XI can I use the version XI Report Viewer instead of what comes with Visual Studio 2003?
|
|
|
|
|
How to get size of object ? i am using vb.net as backend language
|
|
|
|
|
how to do commit transaction in BAL ( business access layer)
for the transaction update/insert/delete.
if i do direct connection to oracle i have command
SqlConnection myConnection = new SqlConnection("Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;");
myConnection.Open();
SqlTransaction myTrans = myConnection.BeginTransaction(); //New a transaction
SqlCommand myCommand = new SqlCommand();
myCommand.Transaction = myTrans;
try
{
myCommand.CommandText = "Update Address set location='23 rain street' where userid='0001'";
myCommand.ExecuteNonQuery();
myTrans.Commit();
Console.WriteLine("Record is udated.");
}
catch(Exception e)
{
myTrans.Rollback();
Console.WriteLine(e.ToString());
Console.WriteLine("Sorry, Record can not be updated.");
}
finally
{
myConnection.Close();
}
but in the case of BAL How to do?
Is it not requried to commit transaction?
vijaya
vijaya
|
|
|
|
|
Hi,
I have a dotnet application in which i have to take text documents from a specified folder in a selected date criteria. I'm using date picker for this. Suppose if i have to fetch the files form some 30/11/2006 to 31/11/2006,There is already folder created in the client name. Inside the client name folder there will be folders created in the name 30/11 and 31/11 respectively with the corresponding dates which has been coded already in the same project. my question is if i select a from data and todate and click submit it has to fetch the records from the folder and has to be displayed ascendingly according to the date specified. can anybody pls help me with a proper solution.
Regards
Vijay.
|
|
|
|
|
Don't repost.
You have already started a thread about this. Stick to that one.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I have a dotnet application in which i have to take text documents from a specified folder in a selected date criteria. I'm using date picker for this. Suppose if i have to fetch the files form some 30/11/2006 to 31/11/2006, For that there will be a folder created in the client name inside the folder there will be folders created in the name 3011 and 3111 respectively with the corresponding dates which has been coded already in the same project. my question is i have to fetch those records if i select a from data and todate and click submit it has to fetch the records from the folder and has to be displayed ascendingly according to the date specified. can anybody pls help me with a proper solution.
Regards
Vijay.
|
|
|
|
|
Don't repost.
You have already started a thread about this. Stick to that one.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hey ,
I need Double click event for a grid view to display the selected row details .How to create double click event in asp.net 2.0.
The gridview contains USERID coloumn as invisible.but Userdetails to be shown in next page will depend on the USERID only.
Thanks
Kusuma
|
|
|
|
|
Do you need double-click or just a single click to navigate to another page.
BTW, you don't need to BOLD you questions.
only two letters away from being an asset
|
|
|
|
|
Come on when they are in BOLD I can tell that he is yelling the question. Perhaps it is loud where he works.
Ben
|
|
|
|
|
I need Double click event only.
Thanks
Kusuma
|
|
|
|
|
Hey
How to show confirmation message with yes or no option in Asp.net page 2.0. The confirmation message to be showed only on certain condition not on any button click.
The scenario is: While creating a user, need to check user name exists in DB, if exists then confirmation message “User name already exists, Do you want create user of same name .Yes and No? “. For this situation I need confirmation message.
Thanks
Kusuma
|
|
|
|
|
The easist way would be to simple display the message as a label on the page after a postback checked if a user existed.
Another way would be for an AJAX call to check the user then you could use the JavaScript confirm function
only two letters away from being an asset
|
|
|
|
|
|
I have a gidview. Inside one cell I want to show only 20 characters and rest have to hide.Can anybody help please
|
|
|
|
|
I think you are saying you only want show the first 20 characters and then truncate after that. If you changed the column to a template column you could do a special binding statement that would only grab the first 20 characters.
Something like:
<asp:TemplateField HeaderText="Your ColumnName Here" >
<ItemTemplate >
<asp:Label id="lbYourCOlumnName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"YourColumnName").ToString().SubString(0,20) %>'></asp:Label>
</ItemTemplate>
Hope that helps.
Ben
|
|
|
|
|
Thanks, I am doing in Asp.net/c#.
|
|
|
|
|
//
dear sir i couldn't able to refer/using Sessions in global.asax under the Application_AcquireRequestState Method.I m getting Application Exception. But it works fine when using..Cookies.Any Suggestions are Greatly appreciated. thanks.
1.Moreover after generating Exceptions the Application is executing with Distortion in StyleSheet Settings.
2.I Searched Alot in Web .But No Source.
//
protected void ddlLanguage_SelectedIndexChanged(object sender, EventArgs e)
{
// I'm initializaing Sessions Based on culture selected from dropDownlist Box
Thread.CurrentThread.CurrentUICulture = new CultureInfo(name); // name="es-US" say,
Thread.CurrentThread.CurrentCulture = new CultureInfo(locale); // locale ="es-US" say,
......
Session["MyUICulture"] = name;
Session["MyCulture"] = locale;
...
}
void Application_AcquireRequestState(Object sender, EventArgs e)
{
// override automatic culture selection from <globalization>
// based on the user's selection which was stored in a cookie
try
{
if (Session.Contents["MyUICulture"] != null && Session.Contents["MyCulture"] != null)
{
System.Globalization.CultureInfo uiCulture = new System.Globalization.CultureInfo(Session["MyUICulture"].ToString());
System.Globalization.CultureInfo Culture = new System.Globalization.CultureInfo(Session["MyUICulture"].ToString());
System.Threading.Thread.CurrentThread.CurrentUICulture = uiCulture;
System.Threading.Thread.CurrentThread.CurrentCulture = Culture;
}
}
catch (HttpException ex)
{
throw new HttpException("Details:" + ex.Message);//Do Nothing.
}
}
Srikar M
|
|
|
|
|
Hi the following code inside if loop is not checking the condition...,
I want to check the if condition also...,
Any probs in my code...,
Plz any one clear my doubt....,
If CType(Maingrd.FindControl("ddlApprove"), DropDownList).SelectedItem.Text = "Paid" Then
Dim AppRgHrs As TextBox = CType(Maingrd.FindControl("txtAppRgHrs"), TextBox)
Maingrd.Cells(10).Text = Maingrd.Cells(7).Text
Maingrd.Cells(11).Text = Maingrd.Cells(7).Text
ElseIf CType(Maingrd.FindControl("ddlApprove"), DropDownList).SelectedItem.Text = "Not Paid" Then
Maingrd.Cells(10).Text = hrs & ":" & sec
Maingrd.Cells(11).Text = hrs & ":" & sec
Dim AppRgHrs As TextBox = CType(Maingrd.FindControl("txtAppRgHrs"), TextBox)
AppRgHrs.Text = ""
Dim NWhrs As Integer = Maingrd.Cells(7).Text
If hrs > NWhrs Then
Dim crghrs As Integer = hrs - 1
Maingrd.Cells(12).Text = crghrs & ":" & sec
Else
Maingrd.Cells(12).Text = hrs & ":" & sec
End If
End If
Magi
|
|
|
|
|
It appear to me that if the selecteditem = "Not Paid" then there may not be anything in Cells(7).Text. I would think that perhaps you want to use Cells(10).text. Also I don't see where hrs is getting set so that may be a problem too. Kind of hard to tell without seeing more code.
Ben
|
|
|
|
|
Magh_M wrote: inside if loop is not checking the condition...,
Impossible.
Set a breakpoint and step through to see what is really happening.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dim AppRgHrs As TextBox
decalre it out side if and use it inside if
condition
else u can't refer it further
vijaya
|
|
|
|
|
Hi,
I have a dotnet application in which i have to take text documents from a specified folder in a selected date criteria. i'm using date picker for this. Suppose if i have to fetch the files form some 30/11/2006 to 31/11/2006. For that there will be a folder created in the client name inside the folder there will be folders created in the name 3011 and 3111 respectively with the corresponding dates which has been coded already in the same project. my question is i have to fetch those records if i select a from data and todate and click submit it has to fetch the records from the folder and has to be displayed ascendingly according to the date specified. i've just started working on it and i have been struggling in the middle. can anybody pls help me with a proper solution. i'm struggling with this.. here is the code which i have completed.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.Odbc;
using System.Configuration;
using System.Globalization;
using System.IO;
using System.Text;
using My_Sql;
namespace hsusa
{
///
/// Summary description for NewClientRecords.
///
public class NewClientRecords : System.Web.UI.Page
{
protected eWorld.UI.CalendarPopup CalTxtFromDate;
protected System.Web.UI.WebControls.Label lblDictTo;
protected eWorld.UI.CalendarPopup CalTxtToDate;
protected System.Web.UI.WebControls.Button btnSearch;
protected System.Web.UI.WebControls.DataGrid MultiDocumentGrid;
protected System.Web.UI.WebControls.Label lblDictFrom;
public string lbl;
protected BunnyBear.msgBox MsgBox1;
protected System.Web.UI.WebControls.Label lblMessage;
protected System.Web.UI.WebControls.Label Label3;
protected OdbcConnection UserCon;
protected OdbcDataAdapter UserAdap;
protected OdbcCommand UserCmd;
DateTime FromDate;
protected System.Web.UI.WebControls.Button Button1;
DateTime ToDate;
string Accname;
string FolderName;
string strUserAcc;
int EDIT;
int VIEW;
int PRINT;
private void Page_Load(object sender, System.EventArgs e)
{
// string z = Session["UserName"].ToString();
//
// //string z = "hsusa" ;
////
// strUserAcc = GetUserAcc(z).ToString();
////
// GetUserPermissions(z);
}
private void Button1_Click(object sender, System.EventArgs e)
{
//string z = "hsusa" ;
//strUserAcc = GetUserAcc(z).ToString();
//GetUserPermissions(z);
if(CalTxtFromDate.SelectedDate>CalTxtToDate.SelectedDate)
{
MsgBox1.alert("From date cannot be greater than to date");
}
else if(CalTxtFromDate.SelectedDate > DateTime.Now.Date)
{
MsgBox1.alert("From-Date cannot be greater than Current-date");
}
else if(CalTxtToDate.SelectedDate > DateTime.Now.Date)
{
MsgBox1.alert("To-Date cannot be greater than Current-date");
}
else
{
// FromDate = CalTxtFromDate.SelectedDate.AddDays(1);
// ToDate = CalTxtToDate.SelectedDate.AddDays(1);
// Get folders in between these dates
FromDate = CalTxtFromDate.SelectedDate;
ToDate = CalTxtToDate.SelectedDate;
string FolderDay = FromDate.Day.ToString();
string FolderMonth = FromDate.Month.ToString();
string FolderDay1 = ToDate.Day.ToString();
string FolderMonth1 = ToDate.Month.ToString();
if(int.Parse(FolderDay) <=9&&int.Parse(FolderMonth) <=9)
{
FolderName = "0" + FolderMonth + "0" + FolderDay.Trim();
}
else if(int.Parse(FolderDay) <=9)
{
FolderName = FolderMonth + "0" + FolderDay.Trim();
}
else if(int.Parse(FolderMonth) <=9)
{
FolderName = "0" + FolderMonth + FolderDay.Trim();
}
else
{
FolderName = FolderMonth + FolderDay.Trim();
}
if(int.Parse(FolderDay1) <=9&&int.Parse(FolderMonth1) <=9)
{
FolderName = "0" + FolderMonth1 + "0" + FolderDay1.Trim();
}
else if(int.Parse(FolderDay1) <=9)
{
FolderName = FolderMonth1 + "0" + FolderDay1.Trim();
}
else if(int.Parse(FolderMonth1) <=9)
{
FolderName = "0" + FolderMonth1 + FolderDay1.Trim();
}
else
{
FolderName = FolderMonth1 + FolderDay1.Trim();
}
try
{
string file;
string[] files;
string filepath;
int last;
//string Accname = Request.Params["Accname"].ToString();
Accname = "SMITH" ;
//Accname = strUserAcc;
DataTable dataTable=new DataTable();
dataTable.Columns.Add(new DataColumn("TextFileName"));
dataTable.Columns.Add(new DataColumn("Date"));
//dataTable.Columns.Add(new DataColumn("DocumentFullPath"));
DataRow dataRow;
filepath = "d:\\Text\\" + Accname + "\\" + FolderName;
files = Directory.GetFiles(@filepath);
for(int i=0;i<files.length;i++)
{
=""
="" datarow="dataTable.NewRow();" file="Path.GetFullPath(files[i]);
" last="file.LastIndexOf("\\");" int="" fileindex="last+1" ;
="" string="" filename="file.Substring" (fileindex);
="" datarow["documentfullpath"]="file;
" datarow["textfilename"]="Filename" datarow["date"]="FolderName;
" datatable.rows.add(datarow);="" }
="" dataset="" dataset();
="" dataset.tables.add(datatable);
="" multidocumentgrid.datasource="dataSet;
" multidocumentgrid.databind();
="" }
="" catch(exception="" ex)
="" label3.text="File Not Found." }=""
="" private="" void="" multidocumentgrid_itemdatabound(object="" sender,="" datagriditemeventargs="" e)
="" {
="" textfilename="e.Item.Cells[2].Text.Trim();
" if="" (edit="=" 0)="" e.item.cells[0].controls.add(new="" literalcontrol("<a="" href="#" onclick="\"window.open('DisplayNew.aspx?PrintDoc=N&FileName="" +="" "&acname=" + Accname + " &foldername=" + FolderName + " ','text','menubar="false')\"">" + TextFileName + ""));
e.Item.Cells[0].Controls.Add(new LiteralControl(" "));
}
else
{
e.Item.Cells[0].Controls.Add(new LiteralControl("" + TextFileName + ""));
// e.Item.Cells[0].Controls.Add(new LiteralControl(" "));
}
}
}
}
Thanks and Regards
Vijay.
|
|
|
|
|
I couldn't really follow your explanation because of the lack of punctuation, it's really hard to read something when you can't tell where one sentence ends and the next begins. You posted your code without using the pre tag, so it lost all indentation, so I didn't even try to read it. You should also post only the relevant code, not your entire project.
It would also help if you specified a little more clearly what it is your are "struggling" with in the "middle".
---
single minded; short sighted; long gone;
|
|
|
|