|
Hi.
I want to put SMTP and POP3 addresses in web.config.
How can access these adresses via code ?
Best wishes
|
|
|
|
|
go to:
http://www.systemnetmail.com/
Example web.config:
<system.net>
<mailSettings>
<smtp from="xy@yourdomain.com">
<network host="mail.yourdomain.com" password="yourpassword" userName="xy@yourdomain.com"/>
</smtp>
</mailSettings>
</system.net>
Best regards
ullk
|
|
|
|
|
Hi.
I have a dynamic website .(All contents are in DB).
How can I write a search for it ?(C#,ASP.Net 2)
Best wishes
|
|
|
|
|
And you think anyone drops a line of code, and you have yourself a custom made search engine on your website?? I think you should provide us lots of additional information.
Just to start
- Find the seach string in the database
- Look within the search results and find 'best matches'
- Order the search results
- Display them
|
|
|
|
|
In my User Controls, how do I set the default property so that if I set it like this...
<custom:MyControl runat="server" ID="ctlTest">Insert Title Here</custom:MyControl>
'Insert Title Here' maps to a specific property in the user control called Title?
|
|
|
|
|
Hi all ,
in my web page i am inputting like asggg in text box. then it is giving error trace as below
A potentially dangerous Request.Form value was detected from the client (TxtBName="aa").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (TxtBName="aa").
If i set to validateRequest=false , then it is not giving the error, but people says there is some security problems.. i don't know what to do..
i want to know what is this error and how to rectify in some other way..
thanking you all..
|
|
|
|
|
|
Question:
How can I access to Images whitch are stored in the main directory /images/button2b.gif in a website that is stored in a subdirectory /member/default2.aspx?
My Problem:
I have a site in a subdirectory /member/default2.aspx
with the following code:
<input type=image id="InputImage2" src="~/images/button2b.gif"
onmouseover="this.src='~/images/button2c.gif';"
onmouseout="this.src='~/images/button2b.gif';"
runat="server" onserverclick="InputImage2_ServerClick"/>
My images are in the main directory ../images/button2c.gif
The code onmouseover="this.src='~/images/button2c.gif';" doesn't go. It search the image in the subdirectory /member/image/button2c.gif but the image is in the main folder /images/button2c.gif.
Do you have any tips?
Best regards
ullk
-- modified at 17:51 Sunday 3rd December, 2006
|
|
|
|
|
hi
i have a code in asp.net have the following problem ==>
in the web page threr is a datagrid and have a datasource from oracle
one of its column is a template and in the edit mode i convert it to
dropdownlist control
but i do not konw how to bind this drop down list with data from the database
please HELP HELP HELP HELP
ME ME ME ME
|
|
|
|
|
what is the method you edit the grid with ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
unig bulid in function ==>
Private Sub dg_find_result_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dg_find_result.EditCommand
|
|
|
|
|
so good..........
suppose that your column index is 2(i.e. the second column).
then inside the dg_find_result_EditCommand, find your DropDownList, like this:
Dim DDL As DropDownList = CType(grdItem.Cells(0).Controls(1), dropdownlist), then write the code to bind your DropDownList.
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
when i write this code ==>
Me.dg_find_result.EditItemIndex = e.Item.ItemIndex
Dim DDL As DropDownList = CType(e.Item.FindControl("lst_temp_order_dir"), DropDownList)
DDL.Items.Add("gggggg")
Me.BindData()
Catch ex As Exception
Me.Literal1.Text = ex.Message
End Try
i get this error ==>
Object reference not set to an instance of an object.
=============================================================
and when i write this ==>
Try
Me.Literal1.Text = ""
Me.dg_find_result.EditItemIndex = e.Item.ItemIndex
Dim DDL As DropDownList = CType(e.Item.Controls(0), DropDownList)
DDL.Items.Add("gggggg")
Session("Edit_S") = e
Me.BindData()
Catch ex As Exception
Me.Literal1.Text = ex.Message
End Try
i get this error ==>
Specified cast is not valid
===============================================
what is the problem and how i can solve it , please ?
|
|
|
|
|
try :
Dim DDL As DropDownList = CType(e.Item.Controls(1), DropDownList)
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
it is also gove me this error ==>
Specified cast is not valid
in the datagrid the first column is the serial which is hidden
and the second one i convert it to drop down list
which i want to fill it with data .
|
|
|
|
|
i have a TemplateColumn and binded by a dataset and has an ImageButton
the url imagebutton is related by the dataest
i want to make an event when i press the ImageButton to priview the image in a biger size in another place i made this code but i have a Parser Error
tell me that:
Type 'System.Web.UI.WebControls.ImageButton' does not have a property named 'TD'.
my code is:
<title>design
protected void button_click(object source,EventArgs args)
{
Label1.Text="Postback!";
}
<asp:datagrid id="DataGrid2" runat="server" showheader="False" autogeneratecolumns="False">
<columns>
<asp:templatecolumn>
<itemtemplate>
<asp:imagebutton runat="server" id="ImageButton1"
imageurl="<img src='<%# DataBinder.Eval(Container.DataItem," temp_photo")%="">' height=60 width=100>" OnClick="button_click()"/>
|
<asp:label id="Label1" runat="server">Label
|
Rania
.net programer
|
|
|
|
|
Hi,
Can anybody guide me to a forum software in ASP or ASP.NET
which I can use without copyright issues and stuff? Like I
want to remove the logo, powered by etc. etc. and still not
get sued.
My requirements are pretty simple:
Lang: ASP/ASP.NET (doesn't matter)
DB: HAS TO BE MSSQL Server!!!
That's it.
This is a bit urgent. Please help.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
You can use dotnetnuke... http://www.dotnetnuke.com
AND - make sure you read through their legal docs before using it
Nila
I do ANYTHING for an extra large cup of coffee!
|
|
|
|
|
I have 2 form pages.(Page1 and Page2) How can I pass data from one page to another using POST method programmatically ??? Is it possible ??? How ??? I need urgent help. please help me .
-- modified at 0:30 Sunday 3rd December, 2006
|
|
|
|
|
That's the drawback of ASP.NET - people don't learn HTML any more...
Use a regular form (not a runat="server" form), set method="post" and action to the url of the second page. Put some form fields in the form and submit the form.
---
b { font-weight: normal; }
|
|
|
|
|
That's the drawback of ASP.NET - people don't learn HTML any more...
I second that, too much abstraction at times.
To answer the question, you could use a regular form and retrieve the posted data on the second page using Request.Form["textboxName"], as Guffa says. Alternatively, if you're using ASP.NET 2.0 you could use Cross-Page Posting instead, and keep everything with runat="server".
In your first page set the PostBackUrl property for your button like this...
<asp:TextBox runat="server" ID="txtMessage" /><br />
<asp:Button runat="server" ID="btnMyButton" PostBackUrl="SecondPage.aspx" Text="Click Me" />
...then in your SecondPage.aspx page...
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if(this.PreviousPage != null)<br />
{<br />
lblSomeLabel.Text = this.PreviousPage.Request.Form["txtMessage"];<br />
}<br />
}<br />
There's more to it though, do a search. If you're doing something relatively simple then it's probably better to use Guffa's approach.
|
|
|
|
|
Hey guys,
I just read abt the Image Element, i realised that once user click the image, the form will b submitted.
The question is, is it possible for me the implement the 'Image Element' for the image which i declare using the bitmap class?
I.e Dim b as new Bitmap("c:\image.jpg")
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
Hi..
I have problem with setting default button property on a page that has a clasical issue.
My page use a master page that has a textbox and imagebutton for search,
and the content page have a login button with two textbox for username and password. I put them in a asp:panel with giving the true defaultbutton property values. but always enter goes to search where ever it. The login controls is default are visible=false. I check on page load event that if the user has login or not, then open login controls to visible=true if needed. I have use asp:panel default value for several times but this times this don work. is there any think you know why could default button does not work?
karanba
|
|
|
|
|
All i want to do is to add a linkbutton to the datalist - done - and then connect it up so that when it is clicked it loads, in a separate window, a pdf. the choice of pdf depends on which 'record' in the datalist the linkbutton clicked is based.
the path will be something like 'uploaded_files/courses/' and then the file name. I have the file name as a field in fed into the datalist called (yes, predictable) 'file_name'.
I have tried all sorts of hints found on the web but it is beyond me. Could someone post some (simple) code and/or point me to a good tutorial to explain things in words of one syllable! The usual plea of a newbie.
cheers
nick neutron
|
|
|
|