Hi, I have window form to let user fill data, I want to alert user if close web browser before saved web form data, could anyone provide any clue?
Thanks,
Martin
View Complete Post
Hi, I have a website that I need to add some dynamic data from asp.net, I'm completely new to .net and am having some problems (usually a php user). K so, I have a simple html tag <a href="" title = "" >my link</a> Now all I want to do is to insert some data in to the href and title parameters. in php I would just use <a href="<?php echo myHrefvar?>" title = "<?php echo myTitlevar?>" >my link</a> I've tried doing <a href="<% = myHrefvar%>" title = "<% = myTitlevar%>" >my link</a> and in my default.aspx.cs I have the variables being set string myHrefvar = "my href"; string myTitlevar = "my title"; but it always gives the message that they're not linked. Have also tried <a href="" title = "" ID=Req1>my link</a> and in the apsx.cs file Req1.HRef = "sdsdsd"; Req1.Title = "sdsdsd"; but again I get an error saying Req1 doesn't exist in the current context. So help, I'm missing something rather fundamental here, any help would be much appreciated. James
Hi,
I have a requirement where i need to send mail from my application. I used the following code to send mail
MailMessage msgMail = new MailMessage(); MailAddress fromAdress = new MailAddress("praveen.k@gmail.com","Mechano"); msgMail.From = fromAdress; msgMail.To.Add("praveen@gmail.com"); msgMail.Subject = "Issue on Website"; msgMail.IsBodyHtml = true; //msgMail.BodyFormat = MailFormat.Html; string strBody = "This is test message"; msgMail.Body = strBody; SmtpClient sClient = new SmtpClient("127.0.0.1", 25); //sClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; sClient.Send(msgMail);
The above code is neither working in my local system not showing error, but after the application has deployed in remote server(this is shared server) the code is working. What might be the problem?
Thanks
Praveen
I would want to know what is better: to keep a lot of data in cache at once or to keep a little data by paging?
For example:
I have 1000 articles and 200 pages.
I have a user control which has a modal popup. This modal popup has a grid and few controls like textboxes and comboboxes. I am trying to clear out all the controls when the close button is clicked. I am using javascript to close the modalpopup. but to clear the controls, $get('<%=txtbox1.clientID%>') method is returning null. can someone please help me?
Here is my code snippet.
function close_Click() { var mdlPopup1; mdlPopup1 = $find('modalPopup'); mdlPopup1.add_hidden(clearInputFields); mdlPopup1.hide(); } function clearInputFields() { var name = $get('<%=txtName.clientID%>');
name.value=""; }
Hi all,
I have a SQL routine which builds me an entire XML file and returns it as a string. If I save the content of this file as sample.xml for instance, I am able to open it in IE or any other browser and the user can expand the nodes and see all the content he wishes.
I am trying to build a ASP.Net page which will display the content of a XML file in the same way (or similar) that the browsers do.
So far, I've been reading some posts and noticed I can use XmlDataSource control and its Data property to load the entire XML doc as a string. Now I am stuck how to display the contents. I found TreeView very confusing and not sure if DataGrid would be a alternative as well. I need to user to be able to open and expand the nodes.
Please someone point me to the right direction. What controls to use, etc... sample codes are the best ;-)
Thank you