Sending Mail Using .NET


Hi ,
\tI have scanning thru on topics of sending mails using
.NET. I have tried the below code for sending mails .
This issue is that mails cannot be sent.

\t\t\t\tDim mail As New MailMessage()
\t\t\t\tmail.To = "tovalidmail@mail.com"
\t\t\t\tmail.From = "fromvalidmail@mail.com"
\t\t\t\tmail.BodyFormat = MailFormat.Text
\t\t\t\tmail.Subject = "Subject of this Email"
\t\t\t\tmail.Body = "Body of this message."
\t\t\t\tSmtpMail.SmtpServer = "localhost"

\t\t\t\tSmtpMail.Send(mail)
\t\t\t\t
\t\t\t\t-----------------------------
\t\t\t\tAlso no error is displayed but mail is nor sent\t

Query
1) This code is run on my home PC Win2k server
\twould the above code be able to send mails using the
\tlocal SMTP server on my machine Or does it require
\ta dedicated Exchange Server setup.
\t
\t
Posted On: Tuesday 1st of January 2013 10:17:49 PM Total Views:  510
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




Questions In JAVA

I am trying to automate login process, i want to retrieve the next page after login....Kindly help me with this problem...
VIEWS ON THIS POST

83

Posted on:

Saturday 10th November 2012
View Replies!

Sending an Email using Smtp server or...?

HiI'm trying to send an email in a asp.net application. I used the following code but I encounter an error. Please help me.Code:Imports System.Web.Mail.SmtpMailCode: Private Sub Btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnlogin.ClickCode:Dim objmail As System.Web.Mail.SmtpMailCode:objmail.Send(Txtemail.Text, Txtto.Text, "Subject", TxtBody.Text)Code: End SubThank you in advanceVbseyyed:thumb:
VIEWS ON THIS POST

204

Posted on:

Saturday 10th November 2012
View Replies!

Help with a dataview grid

I'm not sure what all is needed but this is the code behind the design view for this page. Basically it works however when I start up the page instead of the dataview grid being empty until I run a customer ID, it instead shows the numbers 27,28,29 through 43. Then when I run my customerID number it still shows those numbers yet it also shows what it is supposed to below those numbers. I can't figure out where in the world these numbers are coming from when I run the page. Imports System.Data Partial Class CustomerSurvey Inherits System.Web.UI.Page Dim dvTable As DataView Protected Sub btnGetIncidents_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles btnGetIncidents.Click dvTable = CType(AccessDataSource1.Select( _ DataSourceSelectArguments.Empty), DataView) dvTable.RowFilter = "CustomerID = " & txtCustomerID.Text _ & " And DateClosed Is Not Null" If dvTable.Count > 0 Then Me.DisplayClosedIncidents() EnableControls(True) ' lstIncidents.Focus() Else lblNoIncidents.Text = "There are no incidents for that customer." EnableControls(False) End If End Sub Private Sub DisplayClosedIncidents() lstIncidents.Items.Add(New ListItem("--Select an incident--", "None")) For Each drvRow As DataRowView In dvTable Dim incident As New Incident incident.IncidentID = CInt(drvRow("IncidentID")) incident.ProductCode = drvRow("ProductCode").ToString incident.DateClosed = CDate(drvRow("DateClosed")) incident.Title = drvRow("Title").ToString lstIncidents.Items.Add(New ListItem( _ incident.CustomerIncidentDisplay, incident.IncidentID)) Next lstIncidents.SelectedIndex = 0 lblNoIncidents.Text = "" End Sub Private Sub EnableControls(ByVal enable As Boolean) lstIncidents.Enabled = enable lblHeading.Enabled = enable lblResponseTime.Enabled = enable rblResponseTime.Enabled = enable lblEfficiency.Enabled = enable rblEfficiency.Enabled = enable lblResolution.Enabled = enable rblResolution.Enabled = enable lblComments.Enabled = enable txtComments.Enabled = enable chkContact.Enabled = enable rdoContactByEmail.Enabled = enable rdoContactByPhone.Enabled = enable btnSubmit.Enabled = enable End Sub Protected Sub btnSubmit_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles btnSubmit.Click If Page.IsValid Then Dim survey As New Survey survey.CustomerID = txtCustomerID.Text survey.IncidentID = lstIncidents.SelectedValue If rblResponseTime.SelectedIndex -1 Then survey.ResponseTime = rblResponseTime.SelectedValue End If If rblEfficiency.SelectedIndex -1 Then survey.TechEfficiency = rblEfficiency.SelectedValue End If If rblresolution.SelectedIndex -1 Then survey.Resolution = rblresolution.SelectedValue End If survey.Comments = txtComments.Text If chkContact.Checked Then survey.Contact = True If rdoContactByEmail.Checked Then survey.ContactBy = "Email" Else survey.ContactBy = "Phone" End If Session.Add("Contact", True) Else survey.Contact = False Session.Add("Contact", False) End If 'REDIRECT TO THE WEB PAGE SurveyComplete.aspx Response.Redirect("SurveyComplete.aspx") End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load txtCustomerID.Focus() End Sub End Class
VIEWS ON THIS POST

171

Posted on:

Saturday 10th November 2012
View Replies!

Online Exam Portal Development

Please help me to solve my problem i m new to Asp.Net I want to develop application for online Exam using sql database and also want to include timer in it
VIEWS ON THIS POST

131

Posted on:

Saturday 10th November 2012
View Replies!

Need helpp Score Function in Quiz Software

I've tried using viewstates but these are not used at the moment im trying to track the questionnumber and score the answers choosen, hope some one can help me. i just need a score function please. txtSystemAnswer.Text = "" lblUserName.Text = "John Doe" lblExamineeName.Text = "Charlie Brown's A Dummy" 'Put user code to initialize the page here Dim sysAnswer As String Dim usAnswer As String Dim TrackQuestNum As Integer 'lblTrackNum.Text = TrackQuestNum 'Assign Tracking num to lblTrackNum 'Receive PK/Index for WHERE STATEMENT 'Me.ReceivingIndex = Val(A_form.ReceivedIndex) Me.ReceivingIndex = 1 'This holds ForeignKey value! 'Me.InitializeComponent() 'Call RadioButton Blanking Me.BlankOutRadio() Try Me.SqlConnection1.Open() 'Me.SqlSelectCommand1.CommandText = "Select * From TBL_ExamQuestions WHERE ExamID = ' " & iRecievedIndex & " ' AND QuestionNum = ' " & thispage & " ' ORDER BY QuestionID ASC" Me.SqlSelectCommand1.CommandText = "Select * From TBL_ExamQuestions WHERE ExamID = ' " & ReceivingIndex & " ' ORDER BY QuestionNum ASC" ' Me.DataSet111.Tables("TBL_ExamQuestions").Clear() Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1 Me.SqlDataAdapter1.Fill(Me.DataSet111, "TBL_ExamQuestions") Me.DataSet111.Clear() Me.SqlDataAdapter1.Fill(DataSet111) Me.lblQuestNo.DataBind() Me.TextBox1.DataBind() 'QuestionBox Me.lblSystemAnswer.DataBind() Me.txtSystemAnswer.DataBind() Me.RadioButton1.DataBind() Me.RadioButton2.DataBind() Me.RadioButton3.DataBind() Me.RadioButton4.DataBind() Me.CheckRadioButtons() theSystemAnswer = Val(lblSystemAnswer.Text) theUserAnswer = Val(MyChoice) 'Save Data on temp ViewStates ViewState("CybertronAnswer") = theSystemAnswer 'SysetmAnswer! ViewState("OmegatronAnswer") = theUserAnswer 'UserAnswer ViewState("TotalQuestion") = intTotalQuestion ViewState("Score") = intScore ViewState("QuestionNo") = intQuestionNo 'ViewState("AnswerHistory") = arrAnswerHistory Me.txtSystemAnswer.Text = theSystemAnswer Catch ex As Exception ' No code YET! Finally End Try End Sub Public Sub btnNextQuest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNextQuest.Click Dim abc As String Dim index As Integer Dim TrackQuestNum As Integer Dim ThisScore As Integer theSystemAnswer = ViewState("CybertronAnswer") theUserAnswer = ViewState("OmegatronAnswer") intTotalQuestion = ViewState("TotalQuestion") intScore = ViewState("Score") intQuestionNo = ViewState("QuestionNo") 'arrAnswerHistory = ViewState("AnswerHistory") If theUserAnswer = theUserAnswer Then Me.lblUserName.Text = "Something went in!" Application.Item("ThisScore") = Application.Item("ThisScore") + ThisScore Me.lblYourScore.Text = Application.Item("ThisScore") Else Me.lblUserName.Text = "Its not equal" End If Me.ShowNextQuestion(intQuestionNo) 'Load next question! Me.BlankOutRadio() 'Call RadioButton Blanking! End Sub Public Sub ShowNextQuestion(ByVal intQuestionNo As Integer) Dim abc As String Dim index As Integer Dim TrackQuestNum As Integer Dim usAnswer As String Dim sysAnswer As String If theUserAnswer = theUserAnswer Then Me.lblUserName.Text = "Something went in!" Application.Item("ThisScore") = Application.Item("ThisScore") + thisScore Me.lblYourScore.Text = Application.Item("ThisScore") Else Me.lblUserName.Text = "Its not equal" End If index = Me.ViewState("index") index += 1 If index > DataSet111.Tables(0).Rows.Count - 1 Then index = DataSet111.Tables(0).Rows.Count - 1 'index = 0 End If Me.ViewState("index") = index 'stores the number to viewstate abc = DataSet111.Tables(0).Rows(index).Item("TheQuestion") DataView1.Sort = "QuestionNum" DataView1.RowFilter = "TheQuestion='" & abc & "'" Me.TextBox1.DataBind() Me.lblQuestNo.DataBind() Me.txtSystemAnswer.DataBind() Me.lblSystemAnswer.DataBind() Me.RadioButton1.DataBind() Me.RadioButton2.DataBind() Me.RadioButton3.DataBind() Me.RadioButton4.DataBind() Do ViewState("CybertronAnswer") = theSystemAnswer ViewState("TotalQuestion") = intTotalQuestion ViewState("Score") = intScore ViewState("QuestionNo") = intQuestionNo Loop While (ViewState("index") = index) End Sub Sub CheckRadioButtons() 'Check Radio Button Inputs!!!! ' Me.ViewState("Ans1") = ans1 ' Me.ViewState("Ans2") = ans2 If RadioButton1.Checked Then Me.lblYourAnswer.Text = "A" MyChoice = "A" ElseIf RadioButton2.Checked Then Me.lblYourAnswer.Text = "B" MyChoice = "B" ElseIf RadioButton2.Checked Then Me.lblYourAnswer.Text = "C" MyChoice = "C" ElseIf RadioButton2.Checked Then Me.lblYourAnswer.Text = "D" MyChoice = "D" End If End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged If Page.IsPostBack Then MyChoice = "A" Me.lblYourAnswer.Text = "A" Me.thisUserAnswer = Me.lblYourAnswer.Text End If End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged MyChoice = "B" Me.lblYourAnswer.Text = "B" Me.thisUserAnswer = Me.lblYourAnswer.Text End Sub Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged MyChoice = "C" Me.lblYourAnswer.Text = "C" Me.thisUserAnswer = Me.lblYourAnswer.Text End Sub Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged MyChoice = "D" Me.lblYourAnswer.Text = "D" Me.thisUserAnswer = Me.lblYourAnswer.Text End Sub Sub BlankOutRadio() 'Blank-Out the RadioButtons! Me.RadioButton1.Checked = False Me.RadioButton2.Checked = False Me.RadioButton3.Checked = False Me.RadioButton4.Checked = False End Sub This post has been edited by bryanarzaga: 09 October 2007 - 02:32 PM
VIEWS ON THIS POST

179

Posted on:

Saturday 10th November 2012
View Replies!

Custom membership provider

using vs 2005 and vb.net...I used the following article as a reference for creating a custom membership provider:http://www.devx.com/asp/Article/29256My implementation is a bit different, its using an sql database with a slightly different schema. But, it does function. It also authenticates users correctly except that any LoginStatus controls I use do not seem to notice that the user is authenticated. Logging in seems to work as in it gives me an error when I use an invalid login, and it continues on to the destinationUrl when I provide a valid login. Has anyone implemented a custom membership provider or have any idea why the loginstatus control would not be recognizing that I am logged in
VIEWS ON THIS POST

126

Posted on:

Sunday 11th November 2012
View Replies!

error in text upload to database ????

I was attempting to upload some text to the database and was encountering an error. I spend the better part of 8 hours trying to figure out what was wrong and have found that there was an ' in the text that was causing the error. I need the ability to save those as well as every other text to the database without any problems. So I am looking for any ideas that will help fix this issue.
VIEWS ON THIS POST

160

Posted on:

Monday 12th November 2012
View Replies!

Auto fill textbox

I have a form that includes 2 text input. I'd like the second text input to fill with the value selected from database based on the first textbox value, by default when the first text input loses focus. What methods should I look into to learn to do thisplease help me as soon as possible....
VIEWS ON THIS POST

186

Posted on:

Monday 12th November 2012
View Replies!

posting info from one form to another

I seem to be getting an error when I try to pass info from one page to another with a form\t This is my code........ Code: ' Insert page code here ' Sub SubmitForm(o As Object, e As EventArgs) Dim webbrowser webbrowser.Navigate("javascript:document.form.submit();") End Sub thats the working code, now postForm2.aspx looks like this: Code: Sub Page_Load If Not Page.PreviousPage Is Nothing Then Dim SourceTextBox As TextBox SourceTextBox = CType(PreviousPage.FindControl("theTextbox"), _ TextBox) If Not SourceTextBox Is Nothing Then Label1.Text = SourceTextBox.Text End If End If End Sub Should that not be able to pick up what is in theTextbox form field Cheers
VIEWS ON THIS POST

140

Posted on:

Monday 12th November 2012
View Replies!

Check Box Repeter Check Boxes in java Script

Dear Coders Good Morning i know it has been long time i did not post any topic because of busy schedule anyhow Please i need to help me out , I have a repeter control that lodes within it some controls such as PageId (Literal), PageName(Literal), (checkBox), CanUserRead (checkBox), CanUserAdd (checkBox), CanUserUpdate (checkBox), CanUserDelete (checkBox), CanUserPrint (checkBox), CanUserViewHistory (checkBox), CanUserShowInMenu (checkBox), so these check boxes are in repeater and they implement security for each page in my application so a user may have permission on each page independently i tried to create javascript file to call if user clicks on the head of (Add) so all Check boxes in add Column are checked , but error is raised in java script file here is a diagram PageID PageName Read-Header(CheckBox)[] Add-Header (checkBox)[] . . . . . 1 ABC [] [] . . . . . 2 --- [] [] ......... so if user clicks on Read Header CheckBox all below (columns) relatives Read CheckBoxes are checked Also if also possible if i can add anothrt column names ALL so user clicks on that all Rows (relative checkBoxes are checked row by row ) for example -(Header) [] Read-Header [] andso on if use clicks a all current row check boxes are checked here is my attempts so far: function Check(checkBox ) { var frm = document.aspnetForm; var ChkState=checkBox.checked; for(i=0;i< 1000;i++) { e=frm.elements[i]; if(e.type=='checkbox' && e.name.indexOf('Id') != -1) e.checked= ChkState ; } } function CheckChanged() { var frm = document.aspnetForm; var boolChecked; boolChecked=true; for(i=0;i< frm.length;i++) { e=frm.elements[i]; if ( e.type=='checkbox' && e.name.indexOf('Id') != -1 ) if(e.checked== false) { boolChecked=false; break; } } for(i=0;i< frm.length;i++) { e=frm.elements[i]; if ( e.type=='checkbox' && e.name.indexOf('check') != -1 ) { if( boolChecked==false) e.checked= false ; else e.checked= true; break; } } }
VIEWS ON THIS POST

126

Posted on:

Thursday 15th November 2012
View Replies!

error with script manager

if this is using a master page, then you should be putting the ScriptManager on the master page, and then using the ScriptManagerProxy on the content pages. , do you receive this error message from the standard ASP.Net error page, or do you get an exception when running it in code Can you post the stack trace
VIEWS ON THIS POST

149

Posted on:

Friday 16th November 2012
View Replies!

Touch Screen Program

how to Making a touch Screen Program
VIEWS ON THIS POST

147

Posted on:

Friday 16th November 2012
View Replies!

Write in XML file, asp.net vb.net

! Well I have an aplication in asp.net vb.net, and I want to save something important writing in a xml file, but I want to write in this way: (key,value). In this momento I can write in comments, but I couldn't find the way to write with values and keys. If somebody can help me, would be great! This is my code: Imports System.Xml Dim textWriter As XmlTextWriter = New XmlTextWriter("C:\\myXmFile.xml", Nothing textWriter.WriteStartDocument() textWriter.WriteComment("My important thing") textWriter.WriteComment("myXmlFile.xml in root dir") textWriter.WriteEndDocument() Thank you!
VIEWS ON THIS POST

201

Posted on:

Friday 16th November 2012
View Replies!

Code to encrypt the Password or any string

/// /// Thsi method retrieve the string to encrypt from the Presentation Layer /// And return the Encrypted String /// /// /// public string encryptPassword(string strText) { return Encrypt(strText, "&%#@,:*"); } /// /// This method retrieve the encrypted string to decrypt from the Presentation Layer /// And return the decrypted string /// /// /// public string decryptPassword(string str) { return Decrypt(str, "&%#@,:*"); } /// /// This method has been used to get the Encrypetd string for the /// passed string /// /// /// /// private string Encrypt(string strText, string strEncrypt) { byte[] byKey = new byte[20]; byte[] dv ={ 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; try { byKey = System.Text.Encoding.UTF8.GetBytes(strEncrypt.Substring(0, 8)); DESCryptoServiceProvider des = new DESCryptoServiceProvider(); byte[] inputArray = System.Text.Encoding.UTF8.GetBytes(strText); MemoryStream ms = new MemoryStream(); CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(byKey, dv), CryptoStreamMode.Write); cs.Write(inputArray, 0, inputArray.Length); cs.FlushFinalBlock(); return Convert.ToBase64String(ms.ToArray()); } catch (Exception ex) { throw ex; } } /// /// This method has been used to Decrypt the Encrypted String /// /// /// http://www.hanusoftware.com /// /// private string Decrypt(string strText, string strEncrypt) { byte[] bKey = new byte[20]; byte[] IV = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; try { bKey = System.Text.Encoding.UTF8.GetBytes(strEncrypt.Substring(0, 8)); DESCryptoServiceProvider des = new DESCryptoServiceProvider(); Byte[] inputByteArray = inputByteArray = Convert.FromBase64String(strText); MemoryStream ms = new MemoryStream(); CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(bKey, IV), CryptoStreamMode.Write); cs.Write(inputByteArray, 0, inputByteArray.Length); cs.FlushFinalBlock(); System.Text.Encoding encoding = System.Text.Encoding.UTF8; return encoding.GetString(ms.ToArray()); } catch (Exception ex) { throw ex; } } nospam.com
VIEWS ON THIS POST

169

Posted on:

Friday 16th November 2012
View Replies!

Problem in cmd.Parameters.AddWithValue("@l_no", l_no) Not gett

I table viewyn and dept_letter. primary ket l_no ] protected void l_no_Click(object sender, EventArgs e) { // Fetch the customer id LinkButton lb = sender as LinkButton; string custID = lb.Text; lblCustValue.Text = custID; // Connection string constr = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["JAPITConnectionString"].ConnectionString; string sql = "SELECT * FROM Letter_dept WHERE l_no= @l_no"; SqlConnection connection = new SqlConnection(constr); connection.Open(); SqlCommand cmd = new SqlCommand(sql, connection); cmd.Parameters.AddWithValue("@l_no", l_no); cmd.CommandType = CommandType.Text; SqlDataReader dr = cmd.ExecuteReader(); // Bind the reader to the GridView // You can also use a lighter control // like the Repeater to display data GridView2.DataSource = dr; GridView2.DataBind(); connection.Close(); // Show the modalpopupextender ModalPopupExtender1.Show(); } Error is coming Error 1 The name 'l_no' does not exist in the current context
VIEWS ON THIS POST

118

Posted on:

Friday 23rd November 2012
View Replies!

Email verification

Sir,
VIEWS ON THIS POST

130

Posted on:

Friday 23rd November 2012
View Replies!

online banking with aspdotnet technologies

DSAD
VIEWS ON THIS POST

134

Posted on:

Saturday 24th November 2012
View Replies!

drop down list box only read my first value

hi, i pasted the code but it still doesn't work. i don't understand what is using the SelectedIndexChanged event of the Drop Down List to retrieve the value and load the data. Is it something i need to put in my code
VIEWS ON THIS POST

129

Posted on:

Saturday 24th November 2012
View Replies!

how to use

I need to display one of two placeholders depending on the value in . If the value is "open" i need one placeholder to show (), if the value is "forced" i need the other placeholder to show. () I think i need to use
VIEWS ON THIS POST

132

Posted on:

Sunday 25th November 2012
View Replies!

Java Script in Asp.net

Hi Everyone, i am trying open a popup window in pageload but its not taking the url to default.aspx string a= default.aspx; ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open( 'a', null, 'height=200,width=400,status=yes,toolbar=no,menubar=no,location=no' );", true); error: Url Appear as http://localhost:2031/a anyone help me in this issue
VIEWS ON THIS POST

94

Posted on:

Monday 26th November 2012
View Replies!

Error porblems

HiI am new to .ASP net and have downloaded all i can and I am using MS Visual Web developer expresss 2010.\tI am following some training notes which is showing me how to add a controller but it doesnt seem to work.This is what the training notes tell me to doThis will create a new file, HomeController.cs, with the following code:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace MvcMusicStore.Controllers{public class HomeController : ControllerMVC Music Store Tutorial v2.0 http://mvcmusicstore.codeplex.com Tutorial under Creative Commons Attribution 3.0 LicensePage 14{//// GET: /Home/public ActionResult Index(){return View();}}}To start as simply as possible, let's replace the Index method with a simple method that just returns a string. We'll make two simple changes: Change the method to return a string instead of an ActionResult Change the return statement to return " from Home"The method should now look like this:public string Index(){return " from Home";}I create the Homecontroller but instead of naming it HomeController.cs it names it Homecontroller.vb.The code it creates for ma also looks different than above and I get thisNamespace MvcMusicStore\t\tPublic Class HomeController\t\t\t\tInherits System.Web.Mvc.Controller\t\t\t\t'\t\t\t\t' GET: /Home\t\t\t\tFunction Index() As ActionResult\t\t\t\t\t\tReturn View()\t\t\t\tEnd Function\t\tEnd ClassEnd NamespaceI have tried to change the programming and the function now looks like\t\t\t\tFunction Index() As String{\t\t\t\treturn " from Home";}\t\t\t\tEnd FunctionI then get build errorsCan someone advise why iget .VB and not .CS and why my script is different and finally not working
VIEWS ON THIS POST

190

Posted on:

Tuesday 27th November 2012
View Replies!

Button after Sorting in Gridview

I have a gridview with databinding in the .cs file.Also the soring events are handled there.I have added a button in the gridview colums and with the GridviewIndexChange events I get the row info which I clicked.BUT...when I sort the gridview, the info from this button seems to stays with it's old row, not the new sorted row.What can that be ...grtzLeoni
VIEWS ON THIS POST

187

Posted on:

Tuesday 27th November 2012
View Replies!

Setting up SQL DataBase in VWD

How do i create a connection string to run on a remote server database to use with VWD using\tSQL2000
VIEWS ON THIS POST

125

Posted on:

Tuesday 27th November 2012
View Replies!

Unspecified error

I was wondering if anyone else has had this problem before.\tI have been working on a site at work, and throughout the whole day it works fine, I am connected to the server at my machine at work.\tMy problem is when I come home and start testing the site I get an"Unspecified Error" message and it says the my Conn.Open() statement is the problem.\tJust to really clarify this is where I open my connection to my access database.\tDoes anyone know what I could be doing wrong
VIEWS ON THIS POST

266

Posted on:

Tuesday 27th November 2012
View Replies!

Removing leading tag

,I store data with HTML tags and need to remove a leading tag if present.I tried a few things, also used the Server.HtmlDecode with no luck.\tHow can I do this
VIEWS ON THIS POST

146

Posted on:

Tuesday 27th November 2012
View Replies!

CompareValidator Controls

HiI have an audit record form which shows before and after values for a given record.I've used CompareValidator controls to highlight which fields have changed.I want to see the message from the CV controls when the form is initially displayed - not after a postback.How can I achieve this
VIEWS ON THIS POST

172

Posted on:

Tuesday 27th November 2012
View Replies!

com object

will you invoke COM object from ASP.NET
VIEWS ON THIS POST

192

Posted on:

Tuesday 27th November 2012
View Replies!

ERROR: Unable to start debugging on web server

I am new to ASP.Net. I am getting the following error whenever i am trying to run the project (F5). Unable to start debugging on web server. The server does not support debugginh of ASP.NET or ALT Server applications. Run setup to install the Visual Studio .NET server components. If setup has been run verify that a valid URL has been specified. Any suggestions Email: pankajmsm@yahoo.com
VIEWS ON THIS POST

143

Posted on:

Tuesday 27th November 2012
View Replies!

drop down events

peoples of the forums.I am a little confused as to why my event handler is not fireing.\tI have a drop down list but the selected index event never fires.\tDoes anyone know of problems with this or had it work for youmy event handler is as follows.Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChangedcode in hereEnd Su
VIEWS ON THIS POST

137

Posted on:

Wednesday 28th November 2012
View Replies!

form data validation

, I am a beginner in asp.net trying to validate form data with validation controls.I read that the regular expression validator will not stop a textbox with just blanks or nothing in it from being submitted so a required field validator is needed to too. When I do this, a blank textbox shows an error message for each validator.(1) Is there a way of showing only the first error the controls find(2) If the data checking gets complicated, can programs be written in vb or c# be used for data checking instead of those validation controls(3) Would just doing (2) be better in the long run(4) When viewing the source of the aspx page I was struggling with, I saw Javascript but there is a runat="server" in the control. Is Javascript running at the server sideThankyou very much.
VIEWS ON THIS POST

185

Posted on:

Friday 28th December 2012
View Replies!

drag + drop labels

, Im looking for a way that I can enable a label to be dragged and dropped (by the mouse) around a Panel that it is located within. Any ideas
VIEWS ON THIS POST

200

Posted on:

Tuesday 1st January 2013
View Replies!

Populating a Textbox field based on values of drop down lists

I have two drop down boxes that are populated with a database. Below that I have a text box field, which is also pulling from the same table. This text box field needs to be automatically generated based on the values selected by the user in the two drop down lists. I know I need to set the postback property to true of the second drop down box, so that when the user selects something, it can trigger the text box to generate the value. But I have no idea what to do after that.Any input would be appreciated. Thank you!
VIEWS ON THIS POST

210

Posted on:

Tuesday 1st January 2013
View Replies!

Permission denied when i use fso to delete a file

Hi if i upload a file using the following code, i am unable to delete it using another asp classic FSO.deletefile call.I keep getting permission denied.\tI think that it is not closing the file after the upload.CODEvoid Page_Load(Object sender, EventArgs e){}\t\t\t\tvoid UploadBut_Click(Object sender, EventArgs args){\t\tdecimal ImageWidth = Convert.ToInt32(Request.QueryString["imagewidth"]);\t\tdecimal ImageHeight = Convert.ToInt32(Request.QueryString["imageheight"]);\t\tString preview = Request.QueryString["preview"];\t\tString imgid = Request.QueryString["imgid"];\t\tString FolderPath = Request.QueryString["folderpath"];\t\tString Prefix = Request.QueryString["Prefix"];\t\tString textbox = Request.QueryString["textbox"];\t\tString dateStr = DateTime.Now.ToString("ddMMyyhhmmss");\t\t\t\t\t\tString Extension = ConfigurationSettings.AppSettings["Extension"];\t\tString MimeType = ConfigurationSettings.AppSettings["MimeType"];\t\tlong Quality = Convert.ToInt32(ConfigurationSettings.AppSettings["Quality"]);\t\tlong MaxSize = Convert.ToInt32(ConfigurationSettings.AppSettings["MaxSize"]);\t\tString FilePath = Server.MapPath(FolderPath);\t\tString UploadedFile = PhotoUpload.PostedFile.FileName;\t\tint ExtractPos = UploadedFile.LastIndexOf("\\") + 1;\t\t//to retrieve only Filename from the complete path\t\tString UploadedFileName = UploadedFile.Substring(ExtractPos, UploadedFile.Length - ExtractPos);\t\tString ImageName = UploadedFileName;\t\tStream ImageStream = PhotoUpload.PostedFile.InputStream;\t\tif (PhotoUpload.PostedFile.FileName != ""){\t\t\t\ttry{\t\t\t\t\t\tSystem.Drawing.Image UploadedImage = System.Drawing.Image.FromStream(ImageStream);\t\t\t\t\t\tdecimal oldHeight = UploadedImage.Height;\t\t\t\t\t\tdecimal oldWidth = UploadedImage.Width;\t\t\t\t\t\tif(ImageHeight!=0 && ImageWidth!=0){\t\t\t\t\t\t\t\toldHeight = ImageHeight;\t\t\t\t\t\t\t\toldWidth = ImageWidth;\t\t\t\t\t\t}else if(ImageHeight==0 && ImageWidth==0){\t\t\t\t\t\t\t\toldHeight = oldHeight;\t\t\t\t\t\t\t\toldWidth = oldWidth;\t\t\t\t\t\t}else if(ImageHeight ImageWidth){\t\t\t\t\t\t\t\t\t\toldHeight = (ImageWidth / oldWidth) * oldHeight;\t\t\t\t\t\t\t\t\t\toldWidth = ImageWidth;\t\t\t\t\t\t\t\t}\t\t\t\t\t\t}else if(ImageWidth ImageWidth){\t\t\t\t\t\t\t\t\t\toldWidth = (ImageHeight / oldHeight) * oldWidth;\t\t\t\t\t\t\t\t\t\toldHeight = ImageHeight;\t\t\t\t\t\t\t\t}\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\tint new_height = Convert.ToInt32(oldHeight);\t\t\t\t\t\tint new_width = Convert.ToInt32(oldWidth);\t\t\t\t\t\t\t\t\t\t\t\tusing(Bitmap smallerImg = new Bitmap(new_width, new_height)){\t\t\t\t\t\t\t\tGraphics g = Graphics.FromImage(smallerImg);\t\t\t\t\t\t\t\tg.SmoothingMode = SmoothingMode.HighQuality;\t\t\t\t\t\t\t\tg.InterpolationMode = InterpolationMode.HighQualityBicubic;\t\t\t\t\t\t\t\tg.PixelOffsetMode = PixelOffsetMode.HighQuality;\t\t\t\t\t\t\t\t\t\tforeach (PropertyItem pItem in UploadedImage.PropertyItems){\t\t\t\t\t\t\t\t\t\tsmallerImg.SetPropertyItem(pItem);\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\tg.DrawImage(UploadedImage, 0, 0, new_width, new_height);\t\t\t\t\t\t\t\t\t\tUploadedImage.Dispose();\t\t\t\t\t\t\t\t\t\tEncoderParameters myParams = new EncoderParameters(1);\t\t\t\t\t\t\t\tDateTime MyDate = DateTime.Now;\t\t\t\t\t\t\t\tString MyString =Prefix+dateStr;\t\t\t\t\t\t\t\t//Quality = Quality - 10;\t\t\t\t\t\t\t\tmyParams.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, Quality);\t\t\t\t\t\t\t\t\t\t//Response.Write(FilePath);\t\t\t\t\t\t\t\tsmallerImg.Save(FilePath + MyString + Extension, GetEncoderInfo(MimeType), myParams);\t\t\t\t\t\t\t\t\t\tFileInfo fi = new FileInfo(FilePath + MyString + Extension);\t\t\t\t\t\t\t\t//smallerImg.Dispose();\t\t\t\t\t\t\t\tdecimal FileLen = (fi.Length / 1000);\t\t\t\t\t\t\t\t//myParams.Param[0].Dispose();\t\t\t\t\t\t\t\tif (FileLen > MaxSize){\t\t\t\t\t\t\t\t\t\twhile (FileLen > MaxSize){\t\t\t\t\t\t\t\t\t\t\t\tfi = new FileInfo(FilePath + MyString + Extension);\t\t\t\t\t\t\t\t\t\t\t\tFileLen = (fi.Length / 1000);\t\t\t\t\t\t\t\t\t\t\t\tif (FileLen > 1000){\t\t\t\t\t\t\t\t\t\t\t\t\t\tQuality = Quality - 20;\t\t\t\t\t\t\t\t\t\t\t\t}else{\t\t\t\t\t\t\t\t\t\t\t\t\t\tQuality = Quality - 10;\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t//MyString = MyDate.ToString("ddMMyyhhmmss");\t\t\t\t\t\t\t\t\t\t\t\tmyParams = new EncoderParameters(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyParams.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, Quality);\t\t\t\t\t\t\t\t\t\t\t\tsmallerImg.Save(FilePath + MyString + Extension, GetEncoderInfo(MimeType), myParams);\t\t\t\t\t\t\t\t\t\t\t\tmyParams.Param[0].Dispose();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Thread.Sleep();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t}\t\t\t\t\t\t}\t\t\t\tResponse.Write("window.opener.document.getElementById('"+textbox+"').value='"+Prefix+dateStr+".jpg';\n");\t\t\t\tif(preview!=""){\t\t\t\t\t\tResponse.Write("window.opener.document.getElementById('"+imgid+"').innerHTML='';\n");\t\t\t\t\t\tResponse.Write("window.opener.document.getElementById('"+imgid+"').href='"+preview+Prefix+dateStr+".jpg';\n");\t\t\t\t}\t\t\t\tResponse.Write("self.close()");\t\t\t\t}\t\tfinally {}\t\t}}private ImageCodecInfo GetEncoderInfo(String mimeType){\t\tint j;\t\tImageCodecInfo[] encoders;\t\tencoders = ImageCodecInfo.GetImageEncoders();\t\tfor (j = 0; j < encoders.Length; ++j){\t\t\t\tif (encoders[j].MimeType == mimeType){\t\t\t\t\t\treturn encoders[j];\t\t\t\t}\t\t}\t\treturn null;}\t\t//Upload Image\t\t\t\t \t\t\t\t Choose an image to upload\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t \t\t\t\t Click Add to continue\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }...the bane of my life!http://www.fuzzyd.co.uk
VIEWS ON THIS POST

154

Posted on:

Tuesday 1st January 2013
View Replies!

variable into session variable

I have a table of values that have the same name as session variables.\tI'm trying to pass an item from the table into the code below to check the session variable. if session(" & rs1.Field(2).value & ") ="big" thenone of my session variables has the value big, but the if then doesn't fire.\tDoes anyone see anything wrong with my syntaxp.s. I'm a newbie to asp.
VIEWS ON THIS POST

192

Posted on:

Tuesday 1st January 2013
View Replies!

button as image

how can I change a button to show an image should still be a button but show an image that i set. what is the correct code for this
VIEWS ON THIS POST

301

Posted on:

Tuesday 1st January 2013
View Replies!

How do I put a flash movie on a web form?

Hi.\tI would like to put a flash movie on a web form.\tCan anyone help me to do this
VIEWS ON THIS POST

179

Posted on:

Tuesday 1st January 2013
View Replies!

passing a file over a network & compressing

My asp application makes a downstream (using asp) of a text file. Because that file can be sometimes big >1mb sometimes the downstreams fail. I was wondering if it was possible to compress the file before its sending and then descompress it in the pther side.I realize that if I zip the file, the file becomes 70% smaller than the original size. So I would like to know if is possbible to downstream a pdf file. the machines have windows installed (I think zip comes with\twindows). Another solution would be to create a cab file. Is it possible tooAny exampleThank you
VIEWS ON THIS POST

100

Posted on:

Tuesday 1st January 2013
View Replies!

problem with application deployment

Guys, I have a weird problem here.\tI'm trying to deploy my Web application to another development server.\tI created an installer via Web Setup in .Net, and it installed successfully.\tHowever, it won't update the datagrid.\tThe ItemDataBound function is working, but if the user clicks the update or cancel buttons, nothing happens; the page just refreshes.\tIt works fine on the server it was built on.\tAny idea what's going on here
VIEWS ON THIS POST

176

Posted on:

Tuesday 1st January 2013
View Replies!

datarelation with stored procedure

I've got a problem with making a datarelation in asp.net. I've done it on other pages, but on this page, it just won't work which kept me staring myself blind on some code for the last hours.This is my code in vb.net:CODE'Set SQL Stored Procedure name...\t\t\t\tmSqlString = "exec klantGetKennis "\t\t\t\t\t\t\t\t\t' Child - kennis => registratie\t\t\t\tdr1 = New DataRelation("kennisRegistratie", dc1, dc2, False)\t\t\t\tdr2 = New DataRelation("kennisUren", dc1, dc3, False)\t\t\t\tds.Relations.Add(dr1)\t\t\t\tds.Relations.Add(dr2)\t\t\t\tdv = ds.Tables("kennisverzekering").DefaultView\t\t\t\tIf Not cn Is Nothing Then cn.Close()\t\t\t\thgKennis.DataSource = dv\t\t\t\thgKennis.DataBind()My stored procedure:CODECREATE PROCEDURE [florens].[klantGetKennis ] \t\t\t\t@KlantIdIn\tint\t\tAS/* get kennisgegevens */Select\t\t\t\tkennis.kennisverzekering_id\t\t\t\t,\t\tkennis.kennisverzekering_naam\t\t,\t\tkennis.kennisverzekering_begin_datum,\t\tkennis.kennisverzekering_eind_datum\t\t,\t\tkennis.kennisverzekering_contracturen,\t\tkennis.kennisverzekering_uurtarief\t\tFrom\t\tkennisverzekering as\t\tkennisWhere\t\tkennis.kennisverzekering_klant_id\t\t\t\t= @KlantIdIn/* get registration and coworkers,*/Select\t\treg.kennisverzekering_registratie_id\t\t,\t\treg.kennisverzekering_registratie_kennisverzekering_id,\t\treg.kennisverzekering_registratie_datum\t\t,\t\treg.kennisverzekering_registratie_uren\t\t,\t\treg.kennisverzekering_registratie_omschrijving,\t\treg.kennisverzekering_registratie_onsite\t\t,\t\tmedewerker.medewerker_naam\t\t\t\tFrom\t\tkennisverzekering_registratie\t\tas\t\tregInner join\t\tkennisverzekering on\treg.kennisverzekering_registratie_kennisverzekering_id = kennisverzekering.kennisverzekering_idInner join\t\tmedewerker on\treg.kennisverzekering_registratie_medewerker_id = medewerker.medewerker_id/* get hour total*/Select\t\tsum(registratie.kennisverzekering_registratie_uren) as som_uren,\t\tregistratie.kennisverzekering_registratie_kennisverzekering_id From\t\tkennisverzekering_registratie as registratieGroup by\t\tregistratie.kennisverzekering_registratie_kennisverzekering_idGOThe grid on the page is fairly straight-forward. It has all the fields, and as datakeyfield: kennisverzekering_id .I want to get all the kennisverzekeringen (difficult to explain, but some sort of Service Level Agreement with customers), related to the customers on my page. I want to see all the registrations, our coworkers (medewerkers) have made to these kennisverzekeringen. And very important, I want to see the sum of these registrations for each kennisverzekering.The error I get is:CODEfield or property with the name 'som_uren' was not found on the selected datasource. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: A field or property with the name 'som_uren' was not found on the selected datasource.Source Error: Line 139:Line 140:\t\t\t\thgKennis.DataSource = dvLine 141:\t\t\t\thgKennis.DataBind()Line 142:\t\t\t\tMyGridDataGetKennis = TrueLine 143:\t\tEnd FunctionSource File: bla\grids\kennisverzekering.ascx.vb\t\tLine: 141 Stack Trace: [HttpException (0x80004005): A field or property with the name 'som_uren' was not found on the selected datasource.]\tSystem.Web.UI.WebControls.BoundColumn.OnDataBindColumn(Object sender, EventArgs e) +349\tSystem.Web.UI.Control.OnDataBinding(EventArgs e) +66\tSystem.Web.UI.Control.DataBind() +26\tSystem.Web.UI.Control.DataBind() +86\tSystem.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) +169\tSystem.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) +1408\tSystem.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +49\tSystem.Web.UI.WebControls.BaseDataList.DataBind() +23\tbackoffice.kennisverzekering.MyGridDataGetKennis() in bla\grids\kennisverzekering.ascx.vb:141\tbackoffice.kennisverzekering.Page_Load(Object sender, EventArgs e) in bla\grids\kennisverzekering.ascx.vb:32\tSystem.Web.UI.Control.OnLoad(EventArgs e) +67\tSystem.Web.UI.Control.LoadRecursive() +35\tSystem.Web.UI.Control.AddedControl(Control control, Int32 index) +307\tSystem.Web.UI.ControlCollection.Add(Control child) +153\tbackoffice.navbar.setPlaceHolder(String keuze) in bla\gui\navbar.ascx.vb:145\tbackoffice.navbar.onButtonClick(Object sender, EventArgs e) in bla\gui\navbar.ascx.vb:212\tSystem.Web.UI.WebControls.Button.OnClick(EventArgs e) +108\tSystem.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57\tSystem.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18\tSystem.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33\tSystem.Web.UI.Page.ProcessRequestMain() +1277A lot of code, but I hope someone sees what I'm doing wrong.Oh, btw, I've tried to change the sum field to some other field, but this didn't work either
VIEWS ON THIS POST

154

Posted on:

Tuesday 1st January 2013
View Replies!

Web Service Security

I am relatively new to web services...I have created a service that posts appointments to a specified user's calendar. Now, that function requires some high security to work correctly...here is my current code... CODEPublic Function sendAppt() As String\t\t\tDim iAppt As New CDO.Appointment\t\t\tDim Conn As New ADODB.Connection\t\t\tConn.Provider = "ExOLEDB.DataSource"\t\t\tTry\t\t\t\tWith iAppt\t\t\t\t\t.StartTime = "#" & startTime & "#"\t\t\t\t\t.EndTime = "#" & endTime & "#"\t\t\t\t\t.Subject = Me.apptSubject\t\t\t\t\t.Location = Me.apptLocation\t\t\t\t\t.TextBody = Me.apptMessage\t\t\t\t\t.BusyStatus = CDO.CdoBusyStatusValues.cdoBusy\t\t\t\t\t.MeetingStatus = "Tentative"\t\t\t\t\t'Save the appointment. \t\t\t\t\tConn.Open("http://server.net/exchange/" & Me.mailTo & "/", "dustin", "dustin")\t\t\t\t\t.DataSource.SaveToContainer("http://vkmailtrain01.net/exchange/" & Me.mailTo & "/calendar", Conn)\t\t\t\tEnd With\t\t\t\tReturn True\t\t\t\tConn.Close()\t\t\tCatch err As Exception\t\t\t\tReturn err.ToString\t\t\t\tExit Function\t\t\tEnd Try\t\tEnd FunctionAt the point of Conn.Open is where, currently i'm setting the username and password...now they're not required for that call...is there a way to use IIS security to make this work I've tried to put in the user: dustin pwd: dustin into the anonymous access account in IIS...didn't do it... what am I missing any ideas would be great!!! "...we both know I'm training to become a cagefigher...see what happens if you try 'n hit me..."
VIEWS ON THIS POST

149

Posted on:

Tuesday 1st January 2013
View Replies!

asp.net connect to Access DB on mapped network drive

I'm trying to connect an ASP.net page to an Access DB.\tAt first I had the Access DB on the local server's C drive.\tNow I need to move Access to another server.\tI've mapped the folder where the DB was moved to network drive Z: on the asp.net server.\tAnd change the Data Source of the connection string to Z:/mydb.mdbNow it returns error: The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data. Is there another method to set this up\tWhere I can have ASP.net/IIS on one server and have ADO connections to Access DB on another server.\tThank you.
VIEWS ON THIS POST

148

Posted on:

Tuesday 1st January 2013
View Replies!

problem in retrieving records in dropdownlist box

hi,My Code is given below...HTML Code--________________________________________________________\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDenmark\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tUSA\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIndia\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_________________________________________________________ASP Code--__________________________________________________________Dim MyConnection As SqlConnectionDim MyCommand As SqlDataAdapterDim DS As DataSetMyConnection = New SqlConnection("Data Source=INFO3783;" _\t\t\t\t\t\t\t& "Initial Catalog=GTD_Test;User Id=gtd;Password=gtd;" _\t\t\t\t\t\t\t& "Connect Timeout=15;Network Library=dbmssocn;")MyCommand = New SqlDataAdapter("select * from GTD_M_ORG where LOCATION_ID=33", MyConnection)DS = New DataSet()MyCommand.Fill(DS)' according to above query 'USA' should be selected...i m using this line..cmbCountry.SelectedItem.Text = DS.Tables(0).Rows.Item(0).Item("COUNTRY_NAME")'but it adds a new item as 'USA'..i mean USA comes twice in the dropdownlist...it should come only once..________________________________________________________Thx in advance..
VIEWS ON THIS POST

137

Posted on:

Tuesday 1st January 2013
View Replies!

ASP.NET Windows Integrated Security

This is the first time I'm useing Integrated Security, and I am probably missing something silly.I have IIS set to use Integrated Security and anonymous access is disabled.My web.config file is set to: \t\t\tThis causes the login prompt to appear when accessing the web form, and I cannot log in.\tI don't think that it is doing any real authentication.\tWhen I "allow" a specific user and "deny" another, anybody can get in. Does anybody know what I could be missing
VIEWS ON THIS POST

188

Posted on:

Tuesday 1st January 2013
View Replies!

Image Webservice issue

,Let me explain the setup of our servers first,We have a webserver sitting outside of the firewall, which runs the company site.\tWe also have an internal webserver for our intranet.\tWe also have a SQL server which, as guessed, sits inside our firewall.\tThere is also a internal file server.Our internet webserver will query the database and get the path of some scanned documents for our customers.\tThese documents are images and sit on the file server.\tThen, these images will be displayed on the site for our customers.Since, the webserver is outside of the firewall, we cannot attach any shared drives.\tOur solution: create a webservice that sits on the intranet webserver and gets the info for the internet webserver.\tI was reading up on the webservices info on the net, and noticed that the output of a webservice is always in XML.\tIs there any way that I can return a image file using the webserviceI know that this message is long.\tI do apologize for the length of this message and I appreciate all your help
VIEWS ON THIS POST

208

Posted on:

Tuesday 1st January 2013
View Replies!

Deleteing a Record and Passing a Record

Tek-Tips, two questions for you...So, i've got an Access database driven online application.Pretty normal pretty simple stuff.\tI've got a delete function working just fine, but I find that when I make a record...let's say the Primary ID key is 7...if I delete that record then create a new record the next record's ID is going to be 8.\tI figure this is bad since evetually, although improbable the database even only with one record in it, could be at ID 10000000000 or whatever.\tShould I be concerned\tAlso.\tI'm trying to create a link, that when clicked on goes to a "details" page for instance. Just like on monster.com when you click on the job it sends you too a bigger page with more details and information on it.\tHow can I pass one record to a page and load only that one recordI hope I made sens
VIEWS ON THIS POST

179

Posted on:

Tuesday 1st January 2013
View Replies!

Attaching Files to emails problem

Hi all,i have a form on my webpage that i want to allow users to attach two documents to there emails.\tI know how to attach files to emails using the .Net functions in the System.Web.Mail namespace but this entails the files sitting on the servers file system.\tI want to be able to attach emails that come from the client without having to buy a third party control.\tHas anyone got any ideas on how to do thisRob
VIEWS ON THIS POST

90

Posted on:

Tuesday 1st January 2013
View Replies!

Button Event not firing properly

I seem to be having a problem that I can't figure out.\tI am fairly new to asp.net and am still getting my understanding down so this may be an easy answer question that I haven't been able to find an answer for.I have form which depending on which button is clicked it should either increase or decrease an integer by 1.It seems to work correctly the first time I click a button, but all subsequent clicks are either ignored or processed incorrectly.I have been trying to use the code behind method to do this, since I like it better, but I can't seem to get it to work.My code is below:WebForm3.aspx:CODE\t\t\t\t\t\tWebForm3\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\tWebForm3.aspx.vbCODEPublic Class WebForm3\t\tInherits System.Web.UI.Page#Region " Web Form Designer Generated Code "\t\t'This call is required by the Web Form Designer.\t\t Private Sub InitializeComponent()\t\tEnd Sub\t\tProtected WithEvents btnPrev As System.Web.UI.WebControls.Button\t\tProtected WithEvents btnNext As System.Web.UI.WebControls.Button\t\tProtected WithEvents lblCurrentValue As System.Web.UI.WebControls.Label\t\t'NOTE: The following placeholder declaration is required by the Web Form Designer.\t\t'Do not delete or move it.\t\tPrivate designerPlaceholderDeclaration As System.Object\t\tPrivate Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init\t\t\t\t'CODEGEN: This method call is required by the Web Form Designer\t\t\t\t'Do not modify it using the code editor.\t\t\t\tInitializeComponent()\t\tEnd Sub#End Region\t\tDim currvalue As Integer = 0\t\tPrivate Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load\t\t\t\t'Put user code to initialize the page here\t\tEnd Sub\t\tPrivate Sub btnPrev_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrev.Click\t\t\t\tcurrvalue = currvalue - 1\t\t\t\tlblCurrentValue.Text = Convert.ToString(currvalue)\t\tEnd Sub\t\tPrivate Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click\t\t\t\tcurrvalue = currvalue + 1\t\t\t\tlblCurrentValue.Text = Convert.ToString(currvalue)\t\tEnd SubEnd ClassAny assistance that could be provided would greatly help move my project along
VIEWS ON THIS POST

152

Posted on:

Tuesday 1st January 2013
View Replies!

Joining tables in Dataset

I need to join tables returned in a dataset.Please do not respond to do the join in SQL - suffice it to say - that aint gonna happen.As a sample - dataset will return 2 tablestable(0)CategoryID intCategoryName vartable(1)ItemID intItemName varCategoryID intI will need to join table0 with table1 on CategoryID. After all is said and done will be displaying Categoryname as top level and ItemName as next level in treeview.Can anyone give me a quick sample / overview of how this could be accomplishedThank you !! PHI was walking home one night and a guy hammering on a roof called me a paranoid little weirdo. In morse code. -Emo Phillips
VIEWS ON THIS POST

198

Posted on:

Tuesday 1st January 2013
View Replies!

Design idea/ code sample/ advice needed..

Not sure if I'm on the right path here but this is what i want to do but not sure how to do it...I click on a button, go to the next page. On this page, I want to have 2 radio buttons. The RadioButton1 is the default and has for example 10 textboxes and a submit button with it....\tWhen the Radio Button2 is clicked, i want to display another set of textboxes with a new submit button... so basically, going back and forth between the RadioButton1 and RadioButton2, displays different set of textboxes. How to go about doing this a sample code and/or just an idea on how to do it would be great.
VIEWS ON THIS POST

192

Posted on:

Tuesday 1st January 2013
View Replies!