i have 5 codes line.. how can i go to 2 code line from 5 code line ??

hello friends

i use visual basic for visual web developer

and i have below code.. i have 5 codes line.. how can i go to 2 code line from 5 code line ??

c = 0

second line

If System.IO.File.Exists("~\resimler\") = True Then

c = c +1

i want to go to 2 code line from here

End If

Dim DestinationPath As String = "~\resimler\" & c.ToString & FileUpload1.FileName


Mark as me if my question or my answer can be helpful for you :)
0
oguzkaygun
6/6/2008 11:12:22 AM
asp.net.visual-basic.net 3721 articles. 0 followers. Follow

1 Replies
1158 Views

Similar Articles

[PageSpeed] 47

hello friends

i have solved this problem.. my code is below but i have new problem.. error codel line is FileUpload1.PostedFile.SaveAs(Server.MapPath(DestinationPath)) error message is your part of path was not found... anybody have a idea for this ??

cheers

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click

c = 0

Dim xxx As Label

xxx:

 

Dim DestinationPath As String = "~\resimler\" & c.ToString & FileUpload1.FileName

If System.IO.File.Exists(DestinationPath) = True Then

c = c + 1

GoTo xxx

End If

If FileUpload1.FileName <> "" Then

Dim filepath As String

filepath = DestinationPath

Dim ext As String = Path.GetExtension(filepath)

If ext.ToLower() = ".jpg" Or ext.ToLower() = ".jpeg" Or ext.ToLower() = ".bmp" Or ext.ToLower() = ".png" Or ext.ToLower() = ".tif" Or ext.ToLower() = ".gif" Then

If Image1.ImageUrl = "" Then

FileUpload1.PostedFile.SaveAs(Server.MapPath(DestinationPath))

Image1.ImageUrl = DestinationPath


Mark as me if my question or my answer can be helpful for you :)
0
oguzkaygun
6/6/2008 11:59:40 AM
Reply:

Similar Artilces:

ORDER BY and error message is incorrect syntax. i have two code lines for order by .. first code lines work but second code lines doesnt work.
hello friends my first code lines is below.. but it doesnt work and error message is incorrect syntax near the order.. ??? what should i do ? i have sqldatasource1 and gridview1 for my first code lines and choose datasource of gridview1 is sqldatasource1.. it works when i delete order.. it just works for  "Select * from product where name= '" & Request("TextBox1") & "' and name1= '" & Request("TextBox2") & "' and name2= '" & Request("TextBox3") & "'"quest("Text...

code line :) how can i display source code line in default.aspx.vb ?
hello friends:) hello friends  code line :) how can i display source code line number in default.aspx.vb ? for example 1 2 3 ...... cheers Mark as me if my question or my answer can be helpful for you :) from visual studio tools>options>text editor>basic>genrelform there you select display line numbers Muhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn I can tell you for VS2005. Shouldn't be much different... Tools->OptionsIn treeview on the left: Text Editor-> All Languages -> General Then you'll find Display Line numbers...

This easy 2 lines in 1 line of code
Dim myDate As Date = Now todaysdate.text = FormatDateTime(myDate,vblongdate) cant this be done in 1 line of code? "Only when we are no longer afraid do we begin to live" -D. Thompson // f bush. ----------- "No man succeeds without a good woman behind him. Wife or mother, if it is both, he is twice blessed indeed." -Harold MacMillan No it cant. How about todaysdate.text = FormatDateTime(Now,vblongdate). You can eliminate the variable entirely.. of course if you need the variable then you must declare it and initialize it on a seperate line. ...

Microsoft Visual C# line of code ~ equiv code in PB
I can't figure what this means. I'm forced to interpret MS Visual C# code to write an interface to an external USB device. Can anyone tell me what the equivalent of this expression in PS would be? byte[] ReadersList = new byte[10]; It's obviously a byte array declaration for a variable with name ReadersList. What does setting " = new byte[10]" do? Thanks for any help! Shawn This C# command creates a byte array allocating 10 elements worth of memory. You should be able to do this in PB: Byte ReadersList[10] Shawn wrote: > I can't fi...

Should "update code lines" and "insert code lines" be same page.aspx or be different (update.aspx and insert.aspx)??
hi friends Should "update code lines" and "insert code lines" be same page.aspx or be different (update.aspx and insert.aspx)? if i use same page.aspx for this, code lines be 1000 lines in page.aspx.vb but one page connect to masterpage... if i use different *.aspx for this, code line be 500 lines in per *.aspx.vb  for per *.aspx... but two pages connect to masterpage.. So i have almost 60 pages (*.aspx).. if i select different *.aspx for update and insert, my pages will be 120 pages (*.aspx) which one should i select ? which one runs high performance ? co...

what is in-line code vs code-behind?
I hear these terms thrown around alot but cannot find a definition. I am using webmatrix.(is it a step down from Dominatrix?) "In-line" code is classic asp-like server side scripting placed in the aspx file iteself.Code-behind is seperate class files for the aspx / ascx files which get compiled along with the aspx page. Hope this helpsSam CromerSenior .NET Developer the code behind is the code that you write behind the aspx file it will be aspx.vb or cs  the inline code where you place the code in the HTML file for the page......!!! what is better ??? ....... it is better to use inl...

How to convert C#.Net code to VB.Net code ???...
HI, i was searching something new, then i suddenly find some tips to convert C#.Net code to VB.Net but i did not do well. i am puttint its url here plz tell me how to convert C#.Net code to VB.Net. http://www.dotnetspider.com/code/C-273-Convert-C-VB-NET.aspx Jasim...Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA ) It would be better if you write the problem you having, while converting from C# to VB.NET. You cannot completely rely on online converters. ThanksMark post(s) as "Answer" that helped youElectronic ScrewWebsite||Bl...

Translate c#.net code to vb.net code
Hi I can usually do the translation myself, but this time I am a bit stumped  Let us consider to rewrite Urls (more than 16000 links) using a table. Save original url and rewritten url in a table. Now add a class file in App_Code folder. class UrlRewriteModule : IHttpModule{    public void Dispose()    {        // Nothing to dispose    }    public void Init(HttpApplication context)    {        context.BeginRequest += new EventHandler(context...

.net to vbscript for a line of code... anyone?
<link rel="stylesheet" href="/images<%= session("location")%>/styles.css" type="text/css"> We need to take this line of code in .net, and we need the vbscript version of that. Could anyone be of assistance? We would appreciate it VERY much. :) i'm not sure of what you exactly want, but as far as i know this line is vbscript code. (i'm csharp coder zo this may be legal VB.net code to.. ) Try this <link rel="stylesheet" href="/images<%=Session.Item("location")%>/styles.css" type=&...

Can't call method "modify" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/Net/LDAP/Entry.pm line 252
Hi everyone, I'm trying to do a simple modify on a bunch of records. I search for the record, find it, and at this point, I've got it down to adding just one attribute. The error I get (on every record I try this on) is: Can't call method "modify" on an undefined value at /usr/lib/perl5/site_perl/5.8.5/Net/LDAP/Entry.pm line 252 To verify, I do a $entry->dump before and after the $entry->add, and only the added atribute is changed. I thought this might have had something to do with the ctCalUser schema, which I've had trouble with, but once I...

in line coding vs code behind
Hi Let me know which methos is secure for coding in line coding  or   code behind Please give some fact and refrence Thanks   What do you mean what is more secure they are both .NET code Inline coding and code behind were meant just to separate server side code for client side code, coming to security aspect both don't make any difference as once u'r application is deployed, u'r server side code will be made a DLL The IDE has full support for inline code, which includes IntelliSense not just for code, but for HTML, ASP.NET tags, client script, p...

How to display line numbers next to lines of code
In visual studio 2008 how do I configure the editor so that line numbers are displayed next to my lines of code?      Go To Tools Menu > Options > Select Text Editor in Left Tree > Expand this node to "All Languages" > Check the "Line Numbers" CheckBox which is under "Display" Header on the Right Pane.hope it helps./. Thanx, [KaushaL] || BloG || Profile || Microsoft MVP"I would love to change the world, but they won’t give me the source code"Don't forget to click "Mark as Answer" on the post that helped you....

PB 6.5 not executing some lines of code
Running a PB 6.5 program through the debbugger and it skips over several lines of code - not recognizing them as being executable so they won't process. Can you help? Thx. Please post to powersoft.public.powerbuilder.general This is for PB issues while being used within Jaguar/EAS Thanks A. lballman@sao.state.tx.us wrote: > > Running a PB 6.5 program through the debbugger and it skips over several > lines of code - not recognizing them as being executable so they won't > process. Can you help? Thx. -- __________________________ Adam Simmonds [Te...

Code generation in Microsoft.net ( code that writes code ) Whats its future
Hello, I was just reading a book about Code Generation in .NET. Its damn hard book to read. What do u think is the future of Code GenerationHighOnCodingWanna get high! It's being used now quite a bit. Not necessarily out the box click a button, and you get an application, but applications will generate specific code to function dynamically.Kay LeeMySpace.com - http://www.myspace.com/kragieInfrastructure GroupMySpace.com- Code to live, but Live to code. the refactoring tools already available (and those that are destined for the new IDE) use the same techniques. we will pr...

Web resources about - i have 5 codes line.. how can i go to 2 code line from 5 code line ?? - asp.net.visual-basic.net

Code - Wikipedia, the free encyclopedia
"Decoded" redirects here. For the television show, see Brad Meltzer's Decoded . For the Jay-Z memoir, see Decoded (book) . A code is a rule for ...


Herding Code
While at NDC 2012 in Oslo, Jon and K. Scott talked to Shay Friedman about Roslyn, IronRuby, and the DLR. Download / Listen: 146 – Shay Friedman ...

iPhone, iPad and Mac OS X Cocoa Usability and Development Services - Instinctive Code
iPad, iPhone / iPod Touch and Mac OS X Cocoa development services and UI design.

Re/code
No Bible Available? NY Swears in Politician With iPad Bible App. By Jordan Kahn, Writer, 9to5Mac

Researchers confirm backdoor password in Juniper firewall code
The Juniper NetScreen 5200, one of the firewalls that carries the backdoor code inserted into Juniper's ScreenOS. On December 17, Juniper Networks ...

Loot Crate November 2015 Review and Coupon Code
... full of fun and unexpected gamer swag. Does this month’s Loot Crate look drool worthy to you? Sign up for Loot Crate below and use coupon code ...

My Christmas wish—a 212 area code
What does this New Yorker and entrepreneur want for Christmas? A 212 area code. Here's how you get one.

Juniper faces questions about spying code planted in software
The discovery of spying code nestled deeply in Juniper's networking equipment, the latest example of a major IT vendor caught up in an damaging ...

Cisco launches code review after Juniper's spyware disclosure
CSO Online Cisco launches code review after Juniper's spyware disclosure CSO Online Cisco Systems has launched an internal code review following ...

Resources last updated: 12/24/2015 3:13:42 AM