|
Thanks for the reply. Send ur email id please .It will be easy to discuss
|
|
|
|
|
Click the email link I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I too am up for it, if you find Mark's work rates too high!
|
|
|
|
|
|
Hi, i have published website.
At the time of running the site it through an error as follows,
Invalid at the top level of the document. Error processing resource 'http://localhost/CompiledSite/SamplePage.aspx'. Line ...
This is a marker file generated by the precompilation tool, and should not be deleted!
^
Error: Invalid at the top level of the document
why it comes when i run my website at debug mode it runs well but after publishing it, it throughs an error.
|
|
|
|
|
Check the web.config file to make sure it hasn't been corrupted. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
no yaar the web config is ok my website run well in debugger
|
|
|
|
|
But you said the problem is when you publish it right? That is not the same as debug. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hmmm
but i checked web.config file there no any problem then why this error comes
actualy project get published successfully but when i run,it shows this error.
|
|
|
|
|
|
Hi,
I have a textarea. This textarea is getting some records from the database. The data also contains some hyperlinks and it should be clickable, say for example i am having a text as below.
To download the content, click here.
Now click here is a hyperlink redirecting to another site when clicked.
now this this link is not appearing as a hyper link in my textarea.
Instead of that it is appearing as a plain text in my text area without the actual hyperlink.
How it is possible to get click here text to appear as hyprerlink in my textarea.
Regards,Pranav Dave
|
|
|
|
|
Hi,
Use NavigateUrl property for the Hyperlink control.
regards,
kannak.....kannak
|
|
|
|
|
As in a large textbox where you're entering text?
Probably not with a simple textarea then. Could you elaborate a bit more please.
|
|
|
|
|
Try first saving the contents in HTML in the database. so whenever the information is retrieved it will automatically display the content and embed it automatically with HTML tags.
|
|
|
|
|
Hi,
I think if you do not need to edit,then you can change the text to div or other containers to display the HTML format.
modified 27-May-14 4:53am.
|
|
|
|
|
Hi folks!
Maybe anyone can help me with this. I'm from WPF world and am used to bind to objects in other classes.
I found many examples to bind to lists, but none how to bind to a property of another class.
So here's the deal:
Default.aspx.cs
private DefaultVM vm;
protected void Page_Load(object sender, EventArgs e)
{
this.vm = new DefaultVm();
}
DefaultVM.cs
public int TestValue { get;set;}
public void DefaultVM()
{
TestValue = 10;
}
Default.aspx
<asp:Label runat="server" Text="<%# vm.TestValue%>"/>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"TestValue")%>'/>
<asp:Label runat="server" Text='<%# DataBinder.Eval(vm,"TestValue")%>'/>
None of this works.
Tried a few other things as well, but without result.
What am I doing wrong?
|
|
|
|
|
Try this:
<asp:Label id="lblTest" runat="server" />
then, in Default.aspx.cs (perhaps in OnLoad or wherever you deem appropriate)
vm = new DefaultVM();
lblTest.Text = vm.TestValue.ToString();
Mod: Sorry, yes, just thought: that probably wasn't the answer you were looking for. Make private DefaultVM vm; to public DefaultVM vm; that should do it.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
modified on Friday, February 26, 2010 6:05 AM
|
|
|
|
|
Thank you! That did it:
'<%# DataBinder.Eval(DataItem.vm,"TestValue")%>'
and defining
public DefaultVM vm;
|
|
|
|
|
i have enter the textbox or dropdownlistbox value EX:(kannan)
but i want get first charter to disply other textbox. EX : kSir/Mam,
I'm Kannan.I Like very much for the coding for the project
THANKNG YOU
KANNAN
|
|
|
|
|
OnBlur call a javascript function.
In the function take the value in textbox
var my_car="Ferrari";
var the_char=my_car.charAt(0);
using the above u can get the first character and assign to the second text box.
But be careful, if any postback is happening after this as the value may disappear (as u r assigning in client side). For this you can use hidden value and store in it.
NainaNaina
|
|
|
|
|
ya its fine..and some one douats
i display first 3 charter and assign in other textbox..Sir/Mam,
I'm Kannan.I Like very much for the coding for the project
THANKNG YOU
KANNAN
|
|
|
|
|
Hi, this will be a bit tricky to explain but I'll try my best.
Original page:
I have a page with a button, which when clicked will generate a spreadsheet and prompt the user to download this spreadsheet.
Changes:
Now since we didn't want to the page to refresh,
and at the same time we didn't want to implement an UpdatePanel to this page,
we changed this button to a link which pops-up a new page.
New page:
The new page simply contains this button and a javascript link to close the window.
I did not change the source code of the generate-spreadsheet method.
Generate spreadsheet method:
public static void Export(Page webPage)
{
webPage.Response.Clear();
webPage.Response.Buffer = true;
webPage.Response.Charset = "";
webPage.EnableViewState = false;
string filename = "spreadsheet.xls";
webPage.Response.ContentType = "application/vnd.ms-excel";
webPage.Response.ContentEncoding = Encoding.Default;
webPage.Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName + ";");
string filePath = string.Format("{0}temp\\{1}", webPage.Request.PhysicalApplicationPath, fileName);
populate(filePath);
webPage.Response.TransmitFile(filePath);
webPage.Response.Flush();
File.Delete(filePath);
webPage.Response.End();
}
Problem:
Now here's my problem, the code works perfectly on my local machine, but does not work when I deployed on the server.
On my local, it correctly gives me a download dialog with "spreadsheet.xls" displayed.
On the server, it gives me a download dialog, but the URL (http://www.oursite.com/WebForms/WFrmExport.aspx) of the pop-up page is displayed instead. So when I click "Save", it will just give me an error.
Additional notes:
1. The same export method is used in the original page and the new pop-up page
2. Both original pages and pop-up pages are webforms (*.aspx)
3. The original page works on the server... meaning it correctly prompts me to download "spreadsheet.xls". The problem only occurs on the pop-up page and only on the server.
4. If I remove the File.Delete(filePath); statement, I will see the generated spreadsheet.xls in the correct filepath server directory, which is the same directory used by the original page.
What could be the problem?Rafferty
modified on Friday, February 26, 2010 12:40 AM
|
|
|
|
|
I this it may be the issue of reading file form the server machine so you have to set account of the person who can access the local file system form server to do this :
go to IIS Manager > right click on DefaultAppPool
>> Go to poperties >> Go to Identity Tab >> set security account to local system
|
|
|
|
|
Hi, thanks for your reply. I don't think this is the problem because it can properly download the file if I revert back my changes in the server. The old code and the new changes both access from the same file location.
this is a big headacheRafferty
|
|
|
|
|
I finally found the solution!
I also had to clear the headers of the response, apparently, Response.Clear() only clears the content.
Maybe the header was somehow populated incorrectly by the new pop-up page.
So the fixed method is:
public static void Export(Page webPage)
{
webPage.Response.ClearHeaders();
webPage.Response.Clear();
webPage.Response.Buffer = true;
webPage.Response.Charset = "";
webPage.EnableViewState = false;
string filename = "spreadsheet.xls";
webPage.Response.ContentType = "application/vnd.ms-excel";
webPage.Response.ContentEncoding = Encoding.Default;
webPage.Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName + ";");
string filePath = string.Format("{0}temp\\{1}", webPage.Request.PhysicalApplicationPath, fileName);
populate(filePath);
webPage.Response.TransmitFile(filePath);
webPage.Response.Flush();
File.Delete(filePath);
webPage.Response.End();
}
Thanks to all who wanted to help! Rafferty
|
|
|
|