|
Satish - Developer wrote: "Generate Page" buttton. When i click on it, it generates a webpage with custom name.
ASPX pages are normal files with markup and necessary page directives. So you can use StreamWriter / FileStream to create a file with ASPX extension. BTW, why you need to do this ?
|
|
|
|
|
why i need means, i need to generate this aspx pages in 1000's for search engine optimization.. some of the content has been changed while creating a page.
G. Satish
|
|
|
|
|
Satish - Developer wrote: i need to generate this aspx pages in 1000's for search engine optimization
Ahh, you are lost totally. Have you ever though about maintaining the pages when something changes ? This is not the right way to go. Try URL rewriting instead.
|
|
|
|
|
Do you want to generate user specific code dynamically and display it on the webpage. With HTML formatting in it??? If I am Right...
in .aspx page (This page is common for all the Customers)
<asp:panel id="Panel1" runat="server" height="250px" width="300px">
<div id="ClientBody" runat="server"></div>
</asp:panel>
in .aspx.cs page
string t = ........; //Pass client specific data here. you can also use HTML taga as u wish for formatting the data. Use stringbuilder if you have...........
ClientBody.InnerHtml = Server.HtmlDecode(t); // to display in .aspx page
~JJ
|
|
|
|
|
Hi,
All the Validators(Required field and Regular expression) are working fine on my local machine (not giving any error). When I upload on remote server they are not validating.
I am using .NET Framework 2.0 Required Field Validator to validate my form.
Help me in this regards.
Thanx
Sujit
modified on Thursday, May 29, 2008 9:06 AM
|
|
|
|
|
Can you post the code you have used for the required and reguler validators
We are not a Code Charity
|
|
|
|
|
If I want to delete a "just uploaded" file how do I do it? The File was uploaded with the FileUpload Control. Thank you
|
|
|
|
|
Check this out:
http://www.stardeveloper.com/articles/display.html?article=2003022601&page=1
and this
http://www.velocityreviews.com/forums/t237593-cannot-delete-file-after-file-upload-aspnet-20.html
We are not a Code Charity
|
|
|
|
|
I believe if you haven't exercised PostedFiles.SaveAs, it should be somewhere in the Temp and you can have ASP.NET to do the garbage collection for you at a later stage.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi ,
I have try to get the value of a javascript funtion.The result displayed on the aspx form.My problem is that I cant get the value in aspx.cs part.
I have some code like this in aspx page
<asp:label id="lblop" runat="server"> document.getElementById("lblop").innerText = currency_show_conversion(document.getElementById("lbl_netamt").innerText,"INR","USD");
in lblop the value is printing.
but i try in aspx.cs that,
string abc=lblop.Text
Nothing is get....What things wrong in my code?
please help me
Thanks in advance,
Bijesh
|
|
|
|
|
You have to store the value that u are assigning to the label in a hidden field and access that hidden field in ur code.
When you fail to plan, you are planning to fail.
|
|
|
|
|
We can also use session variables here......
|
|
|
|
|
Hi,
Thanks for your reply.
But I dont know how to use session here.Please give any sample code.
Regards
Bijesh
|
|
|
|
|
example of using session variables in Java Script
function showThankyouMsg(){
var imgwidth, imgheight, messhead, mess1, mess2, mess3, divleft, messageType;
var strCancelCheckIn = '<%=Session["AgreeYN"]%>';
var strPaymentOption = '<%=Session["paymenttype"]%>';
var visitInfoCorrectYes = '<%=Session["visitInfoCorrectYes"]%>';
var strcopayamount = '<%=Session["copayamount"]%>';
var strprimaryins = '<%=Session["primaryins"]%>';
var strcopaytransfail = '<%=Session["copaytransaction"]%>';
var SpeakToStaff = '<%=Session["hydSpkToStaff"]%>';
var paytype = '<%=Session["paymenttypeCash"]%>';
....................
}
|
|
|
|
|
take the value like this
var strSessionValues = document.getElementById('divSessionValues').innerText;
and assign it to the session variable....
|
|
|
|
|
Hi,
ok.How i connect this with my coding?pls go through my first post.where i put session state and I need to assign the label value to session.but here session is assign to a varriable.How I take the value in aspx.cs?
Please give some details.
Thanks again,
Bijesh
|
|
|
|
|
You had a value in JavaScript and want to display it in a label as well as pass it to .aspx.cs file Right??
Write a Separate JavaScript function for that
1. First calculate the value and Place it in the session (use can use above)
2. assign it to the label using (document.getElementById("lblBirthDate").value = '<%=Session["birthdate"]%>';)
3. Call this function on pageload or button click...
~JJ
|
|
|
|
|
Hai,
I write the function like this.
function calculate()
{
alert('welcome');
document.getElementById("<%=lbl_netamount.ClientID%>").innerText
= currency_show_conversion(document.getElementById("lbl_netamt").innerText,"INR","USD");
var amount= document.getElementById("<%=lbl_netamount.ClientID%>").innerText;
'<%=Session["Amount"]%>'=amount;
document.getElementById("lbl_netamount").value = '<%=Session["Amount"]%>';
}
How I call it in aspx.cs page??
Thanks
Bijesh
|
|
|
|
|
Hi,
Please give some sample code for how assigning hiddenfield to the label and how used it in code....
Thanks
Bijesh
|
|
|
|
|
bijeshputhalath wrote: <asp:label id="lblop" runat="server"> document.getElementById("lblop").innerText = currency_show_conversion(document.getElementById("lbl_netamt").innerText,"INR","USD");
drop in a hidden field on to ur UI, set an ID for it for eg:Hid1 and in javascript wtite the following code
document.getElementById("Hid1").value=currency_show_conversion(document.getElementById("lbl_netamt").innerText,"INR","USD");
and now wherevever u need to acces this value in code behind, use
String currency=Hid1.value;
and currency has the value returned by the javascript function.
When you fail to plan, you are planning to fail.
|
|
|
|
|
category name will be retrive from database and display gridview...
if click any one category name the subcategory will be displayed in the menu format..
how to add the sub category middle of the gridview
pls give any idea....
|
|
|
|
|
Dont put question as your subject, give more detail
Do we have to explain to you what subject means?
Have you got any code so far?
Try retrieving data from the database and then binding to the gridview and work from there
We are not a Code Charity
|
|
|
|
|
.netman wrote: Dont put question as your subject, give more detail
Check out this poster's past questions
Ive totally given up on aswering this person's questions.
|
|
|
|
|
None of your questions will be answered until such time you work out how to write a decent subject. You have been asked politely innumerable times.
|
|
|
|
|
yes , I agree too this person doesn't know how to post questions in forums, I think we should create a tutorial for him how to post questions in forums.
|
|
|
|