|
I've been noticing that. Is it possible to set the session variables from the .js scripts that do the filtering (there's a button)?
|
|
|
|
|
No, the session variables never leave the server. If you want to set a session variable from the client, you have to send the information to the server and do the change on the server.
---
b { font-weight: normal; }
|
|
|
|
|
I am trying to write an ASP.NET application fo download files from an FTP site. I have a working example from MSDN that does this successful using a console application, however I would like said functionality on a ASP.NET page? Does this make sense? Can anyone help me? Thanks.
|
|
|
|
|
Hi,
i developed the E-mail application.On SEND button Click i write the following code:
MailMessage msg = new MailMessage();
msg.From = new MailAddress(TextBox1.Text);
string[] to = TextBox2.Text.Split(';');
foreach (string t in to)
{
msg.To.Add(new MailAddress(t));
}
if(TextBox3.Text!="")
{
string[] cc=TextBox3.Text.Split(';');
foreach(string c in cc)
{
msg.CC.Add(new MailAddress(c));
}
}
if (TextBox4.Text != "")
{
string[] bcc = TextBox4.Text.Split(';');
foreach (string b in bcc)
{
msg.Bcc.Add(new MailAddress(b));
}
}
msg.Subject=TextBox5.Text;
msg.Body=TextBox6.Text;
if(RadioButtonList1.SelectedValue=="HTML")
msg.IsBodyHtml=true;
else
msg.IsBodyHtml=false;
SmtpClient sc=new SmtpClient();
sc.Host="localhost";
sc.UseDefaultCredentials=true;
sc.Send(msg);
Response.Redirect("send.aspx");
But the appliaction working.I send mail to Yahoo id.When i opened but there is no message in my Inbox.What is the wrong in the above code.Why there is no message in my inbox.
Thanks In advance.
|
|
|
|
|
Hi,
For the SmtpClient object there is a property called SmtpServer, there you have to provide the IP address of the smtp server, in the yahoo mail box case you can try with URL.
Ram
|
|
|
|
|
I would like to introduce myself as ASP.Net 2.0 beginner. I face a problem when using gridview and sqldatasource.
Problem:
Initially I tried using the SQLDatasource control and Gridview with one parameter in the select query. I made that parameter as a control parameter and set the autopostback of the control. Everything worked fine.
Now I want to have multiple control parameters set for one SQLDatasource and GridView combination (It is basically a kind of search screen and the procedure for select command has so many parameters). I have created all the properties for these controls. But getting stuck with how to trigger the retrieval process. If it is one control, I used the autopostback and ASP.Net did the rest. Now that I have to manually trigger the retrieval of data and the binding on a search button click, am getting stuck.
This is an urgent requirement and Could you please help???
Thanks
Geetha
|
|
|
|
|
all you have to is put datagrid.databind(); in the code that handles the event for your search button.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi
I m using Atlas for asynchronous refreshing the page, and i have a fileupload control on the page. when i use ATLAS the opload control doesnot work > It shows FileUpload.FileName="" , though i browse a file in it.
can any one help me so that both the things works together
thnx
sandeep
|
|
|
|
|
Is it secure to place connection string in our assembly ? for example store it in a variable in our business class .or its better to place it in web.config file.
tell me why ?
|
|
|
|
|
Normally it is good to put the connection string in web.config file.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Not normally. There are valid and useful reasons for not storing it in the config file.
only two letters away from being an asset
|
|
|
|
|
The web.config file is plain text. An assembly is compiled. Which would be easier to read?
You can encrypt the config file. You can also use a tool, such as ILdasm, to view the inards of an assembly, but this is a little more difficult than simply opening a plain text xml file.
only two letters away from being an asset
|
|
|
|
|
Hi,
The connection string should be only on the web.config file.
use CipherData class so that we can encrypt it. then it will be very much secure.
Happy Coding
With Regards
Satips
|
|
|
|
|
Ofcurse its better to save in web.config. because if you deside to change it , you have not to recompile your app and upload dll file...!
|
|
|
|
|
Storing it in your business layer should be the last resort, as will require recompiling and redeploying every time you need to change it.
Other options are:
- store in web.config as clear text
- store in web.config as encrypted string (ASP.NET v2 feature)
- store encrypted in registry (current server) with registry keyname stored in web.config
It all depends on how secure you want it to be (who else has access to your web.config file?) and your deployment process (manual/automated).
.leON.
|
|
|
|
|
how to do a login form using asp.net
|
|
|
|
|
what exactly is the problem are you having.
Best Regards,
Apurva Kaushal
|
|
|
|
|
There are so many login features, and i dont know whats your especific problem, but, let me help you
if you have ASP.NET 2.0 you must to insert one login control to your aspx page
write in the property destinationpageurl the relative url to the next page (welcome.aspx could be it)
Change the Web.config
<authentication mode="Forms">
<forms loginurl="login.aspx" protection="All"
="" defaulturl="login.aspx">
This is a basic authentication concept for any website,
i hope it give you idea
Gracias
Britney
ff
|
|
|
|
|
I forget this code
At this example the login control name is logeo
Use the control event... Logeo_Authenticate
protected void Logeo_Authenticate(object sender, AuthenticateEventArgs e)
{
if ((Logeo.UserName == "a") && (Logeo.Password == "s"))
{
e.Authenticated = true;
}
}
ff
|
|
|
|
|
hi. i have a gridview and want to insert a textbox in a column of each row, and sure i did it.. but i cant get the typed text in the textboxes. i couldn't find them by id.. is there a way to do it?
|
|
|
|
|
hello
for text colum add in grid you can use template column
and find the each text box of each row you can use find control method.
i hope it help full to you.
Softy Boy
|
|
|
|
|
Hi
How we can allow deleting mulitple items at once.Assume we have a DataList web control that is populated with some items from database and we place a check box under each item.Then the user can select items using the checkboxes after that the user can click delete button to delete all selected items at once.How we can do this ? please tell me with nice details. I need to use this technique in a project soon. Please help me.
Thanks in advance
|
|
|
|
|
you can send the IDs of the rows in a comma separated file to your stored procedure and there using cursors you can delete the records separetely.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I dont know how to use cursors and I dont want to. I have a method in my data layer that lets me delete records one by one.My problem is how to retrieve those IDs please tell me.
|
|
|
|
|
you can get the IDs by iterating through all the rows and then checking whether they are selected or not. But in your case there will be so many round trips to database which will decrease the performance of yor application.
Best Regards,
Apurva Kaushal
|
|
|
|