|
First of, I don't know if this is possible, but think about this, user enters some thing into the form then hits enter, off goes the page to be processed, then ooops, you trip, how in the world are you going to take the screen shot of the user display from the server? You need something on the client, don't you?
Since you indicated you are catching ( and possibly logging ) the exception that may give you a clue. If you need more info, you can log user inputs as well. Since you know your form get the user inputs and don't forget input validation.
|
|
|
|
|
You do not need to take print screen for the same.
You can store exception in session and then use
afterward to determine the cause of error.
Like,
catch(Exception e)
{
Session["Error"]=e;
Response.Redirect("Error.aspx");
}
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
thanks jinal,
currently i m doing the same.
to put it more clear i got an error message "Input string was not in a correct format". this error i can fetch. but i dont know what happened. right?
|
|
|
|
|
Find this[^] link useful.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have populated a dynamic grid view from database with Cell text as ON and OFF. I want that off text should appear in "Red" Colour.
Grid rows are generated as no.of employees and columns are days in a particular month from database.
|
|
|
|
|
Using RowDataBound is frequently the best way. Here's a quick example that changes the row color based on the status of a CheckBoxField.
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
If (e.Row.RowType = DataControlRowType.DataRow) Then
Dim cb As CheckBox = CType(e.Row.Cells(1).Controls(0), CheckBox)
If (cb.Checked = False) Then
e.Row.BackColor = Drawing.Color.LightYellow
e.Row.Cells(0).ForeColor = Drawing.Color.Red
Else
e.Row.ForeColor = Drawing.Color.Blue
cb.Enabled = True
End If
End If
End Sub
Please do not repost the question. You have already asked your question here[^]
You can write comment if you have any doubt or further query.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Its not working I have tried, moreover I need C# code. Please Help
|
|
|
|
|
Can you give me your code what you have written?
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
protected void gvEmpCal_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
CheckBox ckh = e.Row.Cells[0].Controls.Add(0);
if (ckh.Checked = false)
{
e.Row.BackColor = System.Drawing.Color.LightYellow;
e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
}
}
}
Actually I need that gridview cells that contains "off" should appear in red colour. Presently On and Off are in same colour.
|
|
|
|
|
Ok, I got the problem. I think you have not understand the code I have posted.
Do one thing.
Replace your
CheckBox ckh = e.Row.Cells[0].Controls.Add(0);
with this one
CheckBox ckh = e.Row.Cells[0].Controls[0];
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Good Day
i am using a RaSchedular(Telerik) and i have an XML File on my solution and i bind my Schedular like this
private void Bind_Viewer_For(String Module)
{
string strExpr = "Code like '%" + Module + "%'";
XmlDataDocument xmlDatadoc = new XmlDataDocument();
xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
RadScheduler1.DataStartField = "STARTDATE";
RadScheduler1.DataSubjectField = "DESCRIPTION";
RadScheduler1.DataEndField = "ENDDATE";
RadScheduler1.DataKeyField = "ID";
dsfinal = xmlDatadoc.DataSet;
if (dsfinal.Tables[0].Rows.Count > 0)
{
DataView dv = dsfinal.Tables[0].DefaultView;
dv.RowFilter = strExpr;
RadScheduler1.DataSource = dv;
RadScheduler1.DataBind();
RadScheduler1.SelectedView = SchedulerViewType.MonthView;
RadScheduler1.SelectedDate = Convert.ToDateTime(dv.Table.Rows[30]["ENDDATE"]);
}
}
dsfinal is declared Globally. i am filtering my data as you can see in the expression and bind the control with the Detail view. Now , my problem is when the updates are made. In the Schedular when updates are made , or when an appointment is moved
i need to Update the Dataset with the changes made. The Demo here Explains a simple xml binding, but i am binding the Schedular with a Dataset and when changes i made, i want to save the changes in the dataset.
Now i have a save button that is supposed to take the changes made in the dataset and merge it back to the xml and my code looks like this
protected void btnCommitChanges_Click(object sender, EventArgs e)
{
XmlDataDocument xmlDatadoc = new XmlDataDocument();
xmlDatadoc.DataSet.ReadXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
DataSet dslist = new DataSet();
dslist = xmlDatadoc.DataSet;
dsfinal.Merge(dslist);
dsfinal.WriteXml(@"C:\Pilot Project\App_Data\TimeTable.xml");
}
as you can see , i am taking the xml that is currently on the file system and i am loading it to a dataset and merge the two dataset. My question here is that is it going to updates the changes or it will override or insert new elements as if i am adding a new record on the xml ?
Again, after refresh the page, i could see the changes were not saved and the xml have not changed from the changes that were made in the dataset.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}
hi i have a two aspx pages page1.aspx and page2.aspx on each page there is a link which open a new window using above javascript, but i want to know the previous page information eighter it open using page1.aspx page or page2.aspx page.
request object is null, so i'm unable to identify.
KnightGuy
|
|
|
|
|
You can access controls of parent page using
window.opener.document.getElementById.
So by using it you can access parent page and do
communication between child and parent page.
For more information refer this[^] link.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
If you want to know in server side then pass a query string value ( ex: page1.aspx?ref=page2) and get the querystring value in server side using Request.QueryString["ref"] . Hope this will solve ur problem.
|
|
|
|
|
Dear, the request object is null.
KnightGuy
|
|
|
|
|
I have Two POP-UP pages. I need to display those data in One page.
For Example:
In First POP-UP Page I have One TextBox and in Second another TextBox. I need to dispaly those two in One Page. How can I do this?
|
|
|
|
|
It is very simple. Just merge these two popup into one.
Create new popup and put both textbox and other functionalities
in this one.
That's it.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have 11 POPUp pages. I do not display 11 at a time. Based on condition i need to display 3 or 4. I don't want to redesign them.
|
|
|
|
|
How you are showing your popup?
Are you loading aspx page into popup?
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Yes. I tried using Iframe. It working fine but only thing bothers me is height of the frame. It should be increased based on page content.
|
|
|
|
|
You can try to fix height and width of frame.
i.e.
<iframe src="news.htm" name="content" width="628" height="380" frameborder="0"></iframe>
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
But I am loading aspx page to frame dynamically (code behind). So Height depends on content page. How can I find height of to be loaded page.
HtmlControl frmPL = (HtmlControl)e.Row.Cells[0].FindControl("frmPL");
frmPL.Attributes["src"] = "../SiteProgress/" + PLName + ".aspx";
|
|
|
|
|
Try this one.
frmPL.Attributes["width"]=628;
frmPL.Attributes["height"]=380;
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
If I fix height of frame, what is the situation if page's height is 500. i don't want to scroll the frame. How can I give Page's height to frame.
|
|
|
|
|
You can refer this[^] link to set height of the frame as the height and width of browser display height.
You need to get your frame by using document.getElementById function and
set it's height and width as shown in example in the forum.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|