|
That is entirely Different.
You can simply do with the Asp.net Control itself.
Regards,
Satips.
|
|
|
|
|
ok i set up the page http://webice.net/addresses/addresses.asp BUT getting it to work with the MS access file, i don't know how to do that.
|
|
|
|
|
Hey guys
I have a datetime field in database table(mySQL) and I want to get distinct DATE not distint DATETIME from that table. Any idea how to get it???
|
|
|
|
|
if your MySQL version is 4.1.1 or above you can use the DATE() function on your query, this function extracts just the date part from a DATETIME value
i.e.: SELECT DISTINCT DATE('your_datetime_fieldname') FROM 'your_table'
hope that helps... and works hehe...
-- modified at 12:35 Thursday 14th June, 2007
maybe it's on the wrong forum but oh well...
|
|
|
|
|
its 4.0 dude n thats the real problem...
|
|
|
|
|
Here is my requirement :
users has to able to create their custom forms through web interface. it should more or less equal to visual studio 2005 deisgner. I come across many articles and done some work around to create a drag and drop scenario in web application for controls but i finally ended with nothing.
Again i changed layout for that maodule :Form Designer:
i came up with linear design which is having a property window on right side holding few common properties for most controls like Control name, control type, height, width etc.
I have another layout having multiple rows & 2 columns(like Left & Right), in each cell i assigned a link button.
Here how i planned to work it out:
When user click on any cell, right side properties will be visible to user and user can select the controls of his/her choice setting some properties to it. Upon clicking save button (which will be located in the property window) program will generate a control at the link button place.
Problems am facing :
I could not able to regenerate the controls after postback done. I could able to save & load control properties from array but could not able to establish the same controls after postback done.
can anyone give me references or suggesstions how to handle multiple dynamic controls after
postback?
from:
krishna
|
|
|
|
|
Some general advice for working with dynamic controls- Always assign dynamic controls and all of their naming containers explicit ids.
- Always recreate your dynamic controls in either the page's
OnInit method or Init event handler. - Ensure that you assign the same id to your controls and all of their naming containers on initial creation and at each postback. Assign the ids at the time you recreate your controls.[
OnInit method or in Init event handler] - Ensure that you place the controls in the same naming containers on the page on initial creation and at each postback. Site the controls at the time you create them.[
OnInit method or in Init event handler] The ASP.NET page model is going to use a combination of UniqueId , ClientId , and positional association within the control tree in order to restore your control's ViewState, match up post data, and raise postback events. In order to make sure that your controls are created properly for that processing to happen, your best bet is always to preform the actions in the page's OnInit method or Init event handler, as I've beaten to death above.
I'd suggest that you take a peek at the Lifecycle of a Page[^]. Even though that article was written for .NET 1.0, it is still accurate for versions 2.0 and 3.0. It may also prove helpful for you to download a copy of Lutz Roeder's Reflector[^] and look over the implementation of the Page class.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi jesse,
Thanks for your valuable suggestion.
I am doing the same steps and also following robbieMorris sample at >
http://www.eggheadcafe.com/articles/extendtextboxviewstate.asp , here he clearly demonstrated creating controls runtime as well as handling them at postback & in viewstate.
In my scenario i took two rows and two columns.
> I have linkbuttons in each cell
> upon clikcing on linkbutton a window will be enabled at right side (assume it as property window)
> From that window user will select controls from a dropdown list (like text box, label etc), enter name, height, width for that controls (as we do in property window).
> upon hitting on save button in that property window, my program will create a runtime control.
> next he'll click linkbutton in another cell and follow same procedure for creating controls.
> but at this point am facing problem though am following Robbie Morris concepts i dont know control is not creating as well as i am loosing last control which i created.
appreciate ypur help on this !!!
From,
Krishna
|
|
|
|
|
If you are following the advice that I posted and the approach that Robbe uses in his tutorial, then I don't see anything in your description that would indicate a design issue. At this point, without looking at some of the code, I don't think that we will be able to help you further.
I'd suggest that we start by looking at the relevant snipits where you recreate the controls on postback / Save button click.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi all,
In my application i wanna display an image of having the current webpage content.
I mean,in my application there is Preview button,in that click event i have to display all the webpage content as Image.
By googling am able to know i have to use mshtml and shdocvw dlls.but
Any one of you pls gime some source
Have a Nice Day Dudes
|
|
|
|
|
Press Print scrn and copy and paste into ms painT?
|
|
|
|
|
HI THanks for the Reply.
But here i need to develop programatically to print the image.
Any suggestions please
Have a Nice Day Dudes
|
|
|
|
|
Hi,
1)
I need to submit a HTML Form. It is like this
2) Now I need to submit this Form using C# ,and Get the Response.
3) How can I do it?. I need to do this dynamically becuase the hidden field values are changing.
Thanks in advance
|
|
|
|
|
hello,
first of all you need to have runat=server for these controls then only you can able to access from code behind
from:
krishna
|
|
|
|
|
Hi All
How to ignore html tags i want to show html tags in the Lable
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Replace < with < and > with > in the label's text. The Literal control has a property Mode , which when set to "Encode " achieves the same thing.
|
|
|
|
|
You can use < and > instead of < and >
|
|
|
|
|
HI Everybody
i am new in asp.net.I am currently working on a e commerce project.
Can anybody tell me how to change items on home page on every page refreshed.
Whenever user refreshed a page i have to show new items every time on home page
which is coming from my database.i ma using asp.net with vb.net.
Thanks in advance.
Rahul
df
|
|
|
|
|
Presuming you have some sort of item ID for each item in the database, generate a random number between the lowest and highest values in your database, and feed that number into the query that pulls the item to be shown out of the database. If you want to show multiple items, you'll need to check for duplicates.
|
|
|
|
|
As you are new please note the following:
1. Please read the forum guidelines. Messages should have appropriate titles. Not 'help' or 'urgent.'
2. You have a previous post of garbage. Please delete this.
______________________
stuff + cats = awesome
|
|
|
|
|
|
Hi All,
first of all, I am extremely sorry for asking the same question again!
my problem is i am trying to send an email in asp.net 2.0. But I keep on getting an exception whenever i try to send..
Here is the exception<b>
Send failure: System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at Default2.btnSubmit_Click(Object sender, EventArgs e)</b>
and here is my code:
protected void btnSubmit_Click(object sender, EventArgs e)
{
SmtpClient smtpClient = new SmtpClient();
MailAddress objMail_From = new MailAddress("username@gmail.com");
MailAddress objMail_To = new MailAddress("username@gmail.com");
MailMessage objMail = new MailMessage(objMail_From, objMail_To);
objMail.Subject = "Email-Test Example";
objMail.IsBodyHtml = true;
objMail.Body = "<html><head><title>Sending E-mails with ASP.NET 2.0 using CSharp</title></head><body>" + "<p>Company : " + lblCompany1.Text + "</p>" + "<p>Address : " + lblAddress1.Text + "</p>" + "<p> Telephone :" + lblTelephone1.Text + "</p>" + "<p> Fax :" + lblFax1.Text + "</p>" + "<p> Email : " + lblEmail1.Text + "</p>" + "<p>Comments : " + lblComments1.Text + "</p>" + "</body></html>";
objMail.Priority = MailPriority.High;
smtpClient.Host = "smtp.yahoo.com";
smtpClient.Credentials = new System.Net.NetworkCredential("username@gmail.com", "xxxxxx");
smtpClient.UseDefaultCredentials = false;
smtpClient.EnableSsl = true;
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
try
{
smtpClient.Send(objMail);
Response.Write("Your mail has been sent");
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
}
and in the web.config i put it like this:
<configuration>
<system.net>
<mailSettings>
<smtp>
<network
host =" smtp.gmail.com"
port =" 587"
userName = "username@gmail.com"
password ="xxxxxx"/>
</smtp>
</mailSettings>
</system.net>
</configuration>
_________
could any one please help me on this... plz..
Thank in Advance.
|
|
|
|
|
DKalepu wrote: smtpClient.Host = "smtp.yahoo.com";
smtpClient.Credentials = new System.Net.NetworkCredential("username@gmail.com", "xxxxxx");
Gmail credentials with yahoo smtp server? You probably should use Gmail's smtp in this case.
|
|
|
|
|
oops...... I pardon for it! that was such a silly mistake...
i hv changed it to gmail smtp..it throws anoter exception now:
Send failure: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required z15sm3365130pod at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at Default2.btnSubmit_Click(Object sender, EventArgs e) in
------
|
|
|
|
|
I tried you code and it seems the line smtpClient.UseDefaultCredentials = false; causes this Exception, so I commented it out and then it worked just fine.
|
|
|
|