|
AFAIK the only way to do it is use < and >.
|
|
|
|
|
You have to convert. The LT GT tags have special purpose meaning for browsers to indicate a markup right?
|
|
|
|
|
You don't have to actually fix it yourself. There is a Utility class for HTMLEncoding.
System.Web.HttpUtility.HtmlEncode
Use that to do your encoding, then put your code inside <pre> tags.
"Quality Software since 1983!"http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles.
|
|
|
|
|
My customers want a print button and I've found how to do it using javascript - window.print() etc
However, I cant find a way to call the javascript function without causing a postback. (I can do it without a postback using just straight html & javascript)
Is there a way to solve this problem ? (Is this even a problem ?)
|
|
|
|
|
Can you post the code for the button? My guess is your using an <asp:button> element, just use a straight element instead, it shouldn't cause a postback. If that doesn't work add 'return false;' to the onclick event of the button.
|
|
|
|
|
Well actually the button is on a 3rd party control (a toolbar).
There are other buttons on the toolbar (which sits in an .ascx on the parent page). Some of the other buttons raise events on the parent page.
The way I got it to work is to take the value of the toolbar click event and if the value is "print" I use a literal control:
TabPageLiteral.Text = "<script language=javascript>window.print()</script>";
So you think I should try this - TabPageLiteral.Text = "<script language=javascript>window.print(); return false;</script>";
|
|
|
|
|
the return false; is only used to suppress the click event on the button (and not cause a postback), its only needed if your using the onclick event of a button directly.
|
|
|
|
|
|
hi all here
i want to know ,that if it is posible to make a variable that i can control it from any page from my website ???
if yes , HoW can i do this ??
Ex: String X ;
page.aspx page2.aspx page3.aspx
x = "abc"; x = "def"; x = "ghi";
i hope that any one understand what i mean.
best regards
Ahemd EL GEndy
Ahmed EL Gendy
|
|
|
|
|
Session, Cache or Application collections (look them up in the docs for the differences)
|
|
|
|
|
Let the pages inherit from a custom base page, which inherits from the Page class. In this class define a protected variable.
|
|
|
|
|
|
Hi Hi
Please help me with this one,when the user click generate info Button to display the report on the next web page,the report should be displayed accoding to the selected starting date up to selected finishing date.
oga m
|
|
|
|
|
write a query like
<br />
SELECT * FROM TABLENAME<br />
WHERE DATE BETWEEN FROMDATE AND TODATE<br />
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Hey there,
I am trying to edit a datagrid. Whenever I click the edit button the grid enters edit mode. But when I change the text in the textbox and click the update(link button) the textbox always goes back to the previous text that was in it.
How do I extract the text from the textbox in the datagrid without losing my change.
below is my code for the update process:
public void Update_dgMilage(object sender, DataGridCommandEventArgs e)
{
TextBox StartMiles = new TextBox();
TextBox EndMiles = new TextBox();
TextBox PersonalMiles = new TextBox();
TextBox BusinessMiles = new TextBox();
TextBox TotalMiles = new TextBox();
StartMiles = (TextBox)e.Item.Cells[3].FindControl("txtStartMiles");
EndMiles = (TextBox)e.Item.Cells[4].FindControl("txtEndMiles");
PersonalMiles = (TextBox)e.Item.Cells[6].FindControl("txtPersonalMiles");
BusinessMiles = (TextBox)e.Item.Cells[7].FindControl("txtBusinessMiles");
TotalMiles = (TextBox)e.Item.Cells[8].FindControl("txtTotalMiles");
string connectionString = ConfigurationSettings.AppSettings["connectionString1"];
OracleConnection con = new OracleConnection(connectionString);
con.Open();
string SQLText = @"update appl_support.HSC_LEASED_CAR_MILES set RPE_MILE_START = '" + StartMiles.Text.ToString() + "', RPE_MILE_END = '" + EndMiles.Text.ToString() + "', PERSONAL_MILES = '" + PersonalMiles.Text.ToString() + "', BUSINESS_MILES = '" + BusinessMiles.Text.ToString() + "', TOTAL_MILES = '" + TotalMiles.Text.ToString() + "' where LCM_PKEY = '" + e.Item.Cells[1].Text.ToString() + "'"; //e.Item.Cells[1].Text.ToString()
// assign query and execute
OracleCommand cmd = new OracleCommand(SQLText,con);
cmd.ExecuteNonQuery();
con.Close();
con.Dispose();
//gets datagrid out of edit mode
dgMilage.EditItemIndex = -1;
getLeaseMilage();
}
Please Help anyone
|
|
|
|
|
For starters you don't need to instantiate a new text box for each of the variables, its just a waste of objects since you then override them straight away. Just use TextBox StartMiles = (TextBox)e.Item.Cells[3].FindControl("txtStartMiles");
What event of the GridView is this method attached to?
How are you databinding the GridView in the first place? If your using a data source control (like SqlDataSource or ObjectDataSource) it would be much easier to configure the UpdateCommand on the data source properly.
|
|
|
|
|
|
Hi all,
I have an Access database linked to ASP,NET, using VB. In the ASP.NET code, on the page load, i want to create a table in my Access database, im not sure how to do this, can anyone help? Thanks
|
|
|
|
|
|
How can i capture the events of "open" & "save" button clicked of a file download dialog box, at the server through an ASP.NET Web Application ? Is there any classes for file download in .Net framework, through which we can create a reference to the file dialog events ?
I will be very happy if i could get some information related with C#.
If any body could give any information or if any body could give some links i will be grateful.
jij
|
|
|
|
|
The browser implements the file dialogue box client side so there is no way to get its properties server-side. As far as I know no browser exposes these events in Javascript.
|
|
|
|
|
For security reasons, web browser may not allow such options.
|
|
|
|
|
Dear all,
i am making small web application using ASp.net , C# (VS2005).
Actually through this utility one can attach crystal report to web application without making any change in the code.
i am loading crystal report thrugh following code
reportdocument = new ReportDocument();
reportdocument.Load(reportpath);
CrystalReportViewer1.ReportSource = reportdocument;
Now my problem is in one report . when i run through IDE(VS2005),
it shows the output but when i do the same. it does not show any
output. please suggest some idea where i am going wrong ?
thanks
regards
imran khan
|
|
|
|
|
how do you deploy your application on the server ?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
its basiclly a small web application. i implement it in intranet through virtual path. other report are running fine but only one report have a problem.
thanks for quick reply
regards
imran khan
|
|
|
|