|
If your document is under the project folder(application folder), then specify the src attribute using relative url like src="/Project/testMailMerge.doc'
|
|
|
|
|
My document is not under project folder. It is in another folder. The problem is if I use notepad and save the page in html format, the document is opened but with asp page it didn't work. Any more idea?
|
|
|
|
|
hi all..
I have an asp:dropdownlist on that page.
After an UpdatePanel async postback, the DropDown stops working. it is clickable but does not open up (or drop down).
If you click somewhere else on the page, then click again on the dropdown then it expands, but the value does not change.
Then, if I switch to another Browser window or another application then come back, Voila! it has become ok. The dropdown now works completely normal.
This all has started happening recently only in Firefox. All other browsers including IE 7, Chrome, Safari don't have this issue and work perfectly fine.
can you help me on this
Thank you.
siri
|
|
|
|
|
|
i have deployed a web application where i have out session timeout in web.config
<sessionState cookieless="false" timeout="330"/> and in state management in ASP.net configuration settings on IIS.
after this the application still time out before the defined time. Any ideas?
|
|
|
|
|
Did you check if your web.config timestamp got inadvertantly updated by any applications?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
|
What is the SessionState Mode ?
Here is one of my article on session, Hope this will give you some more idea on session.
Exploring Session in ASP.Net
|
|
|
|
|
|
Are you deleting any sub folder under the application root folder in your asp.net code. If so, it will restart the AppDomain.
Check this link[^]
modified on Wednesday, May 13, 2009 3:29 AM
|
|
|
|
|
You have configured 330 but Can you tell what is actual timeout and what is session mode u r using?
|
|
|
|
|
Hi I have nested gridviews bounded to data tables. On child gridview delete event I'm trying to fetch the parent gridview row index somehow to fetch the child gridview through find control and databind it to show the updated changes. However I am fetching the the wrond index through my code as its returning the row number of the child and not the parent. Here's my row delete event for the child.
protected void gvSec_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
GridView gvtmp = (GridView)gvComp.Rows[e.RowIndex].FindControl("gvSec");
DataTable tmpdt = (DataTable)ViewState["SecTab"];
if(tmpdt!=null)
{
tmpdt.Rows.RemoveAt(e.RowIndex);
}
gvtmp.DataSource = tmpdt;
gvtmp.DataBind();
ViewState["SecTab"]=tmpdt;
}
|
|
|
|
|
Try the following code. You can get the parent GridView row by
((GridView)sender).Rows[e.RowIndex].Parent.Parent.Parent.Parent
Also you can get the control or cells value of the parent gridview using
((GridView)sender).Rows[e.RowIndex].Parent.Parent.Parent.Parent.Controls[0] collection
|
|
|
|
|
Thanks for the reply Mr. Ramesh. It solved my problem, can you please explain a little how this Parent.Parent works ? I mean logically .
((GridView)sender).Rows[e.RowIndex].Parent.Parent.Parent.Parent
How does .NET drill down the parent by using this parent property/method ?
Thanks, Mike.
|
|
|
|
|
Is there any built in function in ASP.NET Like print_r in Php which displays information about a variable in a way that's readable by humans.
|
|
|
|
|
The question is where you want to display this text? if its on the browser with nothing you can use Response.Write() function to write whatever you want on the rendered output.
Sincerely Samer Abu Rabie
Imagination is more important than knowledge !
|
|
|
|
|
Hi,
I must have searched every forum on the internet and tried every custom function going to try gain control over textboxes in the insert template of my formview using VB code behind without any success and its starting to bug me.
Consider the following scenario:
If I have a formview with ID: "Details"
and a textbox called: "CampaignTextBox" in the <insertitemtemplate>
and wish to set the .text value of "CampaignTextBox" to "Hello World"
I believe the most obvious method is as follows:
<br />
Dim Dynamic_Text As TextBox = CType(Me.Details.FindControl("CampaignTextBox"), TextBox)<br />
Dynamic_Text.text = "Hello World"<br />
It doesn't matter how I manipulate this code I cannot get my code to find the control - I get a null reference exception - "Object reference not set to an instance of an object.."
Other details about my page that may affect this (possibly):
1-It is a page that uses a master page, does this cause issues?
2-If my formview is within a div would this make any difference?
Could anyone give me any clues or if at all possible an example using the parameters given above and save me from going bald before I get to 30?
Thanks
Andy
|
|
|
|
|
In case anyone suggest these, I have also just tried omitting "Me"
<br />
Dim Dynamic_Text As TextBox = CType(Details.FindControl("CampaignTextBox"), TextBox)<br />
and trying to add the extra level of "row"
<br />
Dim Dynamic_Text As TextBox = CType(Details.row.FindControl("CampaignTextBox"), TextBox)<br />
and experience the same problem.
|
|
|
|
|
ur coding is correct but u need to make dummy binding to form view to make it build control hierarchy.
try this in page load,
If Not Page.IsPostBack Then
Dim arr As New ArrayList()
arr.Add(1)
Details.DataSource = arr
Details.DataBind()
End If
|
|
|
|
|
Hi,
thanks for your reply.
When I try the code in the page load event I get the following error:
"Both DataSource and DataSourceID are defined on 'Details'. Remove one definition"
What could cause this error message in this context?
I don't understand the need to create a dummy binding. Would you mind explaining as if I understand it I may be able to figure out where I'm going wrong?
Cheers
Andy
|
|
|
|
|
I have finally cracked it. No dummy databinds required or anything other than the findcontrol method.
The key is purely down to using the method at the correct time in the page life cycle.
I used the following to set a textbox to the current date and time.
where:
Formview ID = "Details"
Formview child Textbox to change ID = "Date_AddedTextBox"
(Textbox is in the insert template)
<br />
Protected Sub Details_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Details.DataBound<br />
<br />
If Details.CurrentMode = FormViewMode.Insert Then<br />
<br />
Dim Test As TextBox = CType(Details.Row.FindControl("Date_AddedTextBox"), TextBox)<br />
Test.Text = Now()<br />
<br />
End If<br />
<br />
End Sub<br />
So ... if like me you have been to hell and back via the entire internet trying to do what seems like the simplest thing, trust your code as it is probably correct and try it at a time where the items have definitely been created and and data definitely bound (such as the event I used above) and you should have success.
|
|
|
|
|
This is how we can open a parent window from a chid window and the beauty to pass parameters
<code>
<a href="#" onclick='window.opener.navigate("forumTopics.asp?forumID=<%=forumID%>");window.close();'>myLink</a>
|
|
|
|
|
The men in the white lab coats are looking for you.
Was this supposed to be a question?
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
This isn't a question. I was having hard time doing this thing i wanted now I got the answer so I shared it. Somebody will be benefited
|
|
|
|
|
Rather than posting it in a fast moving forum, where it gets swallowed up and forgotten quickly, you could put it in the Wicked Code[^] forum.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|