Click here to Skip to main content
15,886,137 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Help Needed Again: Funny Effects about My.Settings Pin
Sonhospa13-Dec-16 6:48
Sonhospa13-Dec-16 6:48 
GeneralRe: Help Needed Again: Funny Effects about My.Settings Pin
Eddy Vluggen13-Dec-16 8:31
professionalEddy Vluggen13-Dec-16 8:31 
QuestionMy.Settings out of scope? Pin
Sonhospa24-Nov-16 0:42
Sonhospa24-Nov-16 0:42 
AnswerRe: My.Settings out of scope? Pin
Richard MacCutchan24-Nov-16 1:08
mveRichard MacCutchan24-Nov-16 1:08 
GeneralRe: My.Settings out of scope? Pin
Sonhospa24-Nov-16 1:25
Sonhospa24-Nov-16 1:25 
GeneralRe: My.Settings out of scope? Pin
Richard MacCutchan24-Nov-16 2:10
mveRichard MacCutchan24-Nov-16 2:10 
Answer[Resolved] Re: My.Settings out of scope? Pin
Sonhospa24-Nov-16 2:32
Sonhospa24-Nov-16 2:32 
Questionvb.net using string and custom objects Pin
dcof18-Nov-16 17:10
dcof18-Nov-16 17:10 
In a vb.net 2010 application, I am trying to determine the best way to accomplish this goal.
Write now 1 letter is generated and sent to one guardian. However this application needs to be
changed so that the same exact letter can be send to different mailing addresses since each student may have more than one parent/guardian at different mailing addresses. So basically I want to generate more than one letter with the same wording. The only differences between the letters would be the mailingaddresses. I want the letters to be written to the same varchar(max) column in a sql server 2012 database. The letters will be in the same field since the data will be sent to a sql server reporting server where the letters will be generated one after each other.Right now the letters are written to the 'Dim _al As Letters = New Letters()' object. The only way I know to modify text data is to use a string or stringbuilder objects. I do not know yo modify data is other objects. Basically I want to use a string.replace logic to replace the addresses in the second letter. I also want to use
stringbuilder.append to place more than one letter following another to be placed in the osne varchar(max) field.
I know I can use the following code to convert a custom object to a string.
 Dim _LetterStr As String = String.Empty 
 Dim _LetterStrbldr As StringBuilder = New StringBuilder 
 _LetterStr = _Letter.Letter.ToString() 

However I do not know how to convert a string object back to a custom object.
Here is the original code of the application:
#Region "Protected Sub btnSubmitModifiedLetter_Click(ByVal sender As Object, 
ByVal e As System.EventArgs) Handles btnSubmitModifiedLetter.Click" 
    Protected Sub btnSubmitModifiedLetter_Click(ByVal sender As Object, ByVal e 
As System.EventArgs) Handles btnSubmitModifiedLetter.Click 
        Dim _al As Letters = New Letters() 
        Dim _infinteCampusText As String 
        Dim _Letter As Letter = New Letter() 
        Dim _startDate As DateTime = Now() 
        Dim _term As Integer = 0        
 
        _Letter.SchoolYear = _schoolyear 
        _Letter.Term = _term 
        _Letter.Milestone = ddlMilestone.SelectedValue 
        _Letter.SchoolNumber = Right("000" & ddlSchools.SelectedValue,3) 
        _Letter.Printed = "Y" 
        _Letter.Letter = reLetterEditor.Content 
        _Letter.StudentLink = Right("0000000" & txtStuLink.Text, 7) 
        _Letter.Language = txtLanguage.Text 
 
        _infinteCampusText = _al.BuildText(_Letter)   
 
        _al.InsertData(_Letter, _infinteText) 
 
        btnProcessSelections.Visible = False 
        gvLetters.DataSourceID = String.Empty 
        gvLetters.DataBind() 
        gvLetters.Visible = False 
        Response.Redirect("letter.aspx?schoolyear=" + 
_Letter.SchoolYear.ToString() + "&schoolnum=" + 
_Letter.SchoolNumber.ToString() + "&term=" + 
_Letter.Term.ToString() + "&milestonecode=" + 
_Letter.Milestone.ToString() + "&startdate=" + _startDate.ToString() + 
"&enddate=" + DateAdd(DateInterval.Day, 1, Today()).ToString() + 
"&language=ALL&studentlink=ALL") 
 
    End Sub 
#End Region 

Thus can you show me the code to convert a string object to a custom object and/or show me code on how to accomplish my goal?
AnswerRe: vb.net using string and custom objects Pin
Richard MacCutchan18-Nov-16 22:02
mveRichard MacCutchan18-Nov-16 22:02 
GeneralRe: vb.net using string and custom objects Pin
dcof21-Nov-16 5:31
dcof21-Nov-16 5:31 
GeneralRe: vb.net using string and custom objects Pin
Richard MacCutchan21-Nov-16 6:59
mveRichard MacCutchan21-Nov-16 6:59 
GeneralRe: vb.net using string and custom objects Pin
Dave Kreskowiak21-Nov-16 9:28
mveDave Kreskowiak21-Nov-16 9:28 
AnswerRe: vb.net using string and custom objects Pin
David Mujica21-Nov-16 10:56
David Mujica21-Nov-16 10:56 
Questionissue in vb script while using MSXML2.ServerXMLHTTP.6.0 object Pin
praveenvb17-Nov-16 0:17
praveenvb17-Nov-16 0:17 
AnswerRe: issue in vb script while using MSXML2.ServerXMLHTTP.6.0 object Pin
Member 1032934426-Jul-17 17:23
Member 1032934426-Jul-17 17:23 
QuestionSet Focus on a textbox after showing form.showdialog() Pin
Hermawan2611-Nov-16 19:46
Hermawan2611-Nov-16 19:46 
AnswerRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan11-Nov-16 23:20
mveRichard MacCutchan11-Nov-16 23:20 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 3:55
mveRichard Deeming12-Nov-16 3:55 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 4:33
mveRichard MacCutchan12-Nov-16 4:33 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 4:37
mveRichard Deeming12-Nov-16 4:37 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 4:46
mveRichard MacCutchan12-Nov-16 4:46 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 5:48
mveRichard Deeming12-Nov-16 5:48 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard MacCutchan12-Nov-16 21:28
mveRichard MacCutchan12-Nov-16 21:28 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Dave Kreskowiak12-Nov-16 6:47
mveDave Kreskowiak12-Nov-16 6:47 
GeneralRe: Set Focus on a textbox after showing form.showdialog() Pin
Richard Deeming12-Nov-16 11:44
mveRichard Deeming12-Nov-16 11:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.