|
Thank you. It is working. One more doubt. I am uploading files (.doc,.gif,.excel,etc) and storing in the server. Now I want to open those files when i click the link buttons. But I am able to get only the path but how to open it. what changes i need to the following code?
Dim SQLString As String = "SELECT filepath FROM pictures WHERE title = '" & BulletedList1.Items(e.Index).Text & "'"
Dim dr As Data.SqlClient.SqlDataReader
Dim comm As New Data.SqlClient.SqlCommand(SQLString, dbconn)
If dbconn.State <> ConnectionState.Open Then
dbconn.Open()
End If
Dim str As String
dr = comm.ExecuteReader
While dr.Read
str = dr.Item(0)
End While
dr.Close()
TextBox1.Text = str
Chaitra N
|
|
|
|
|
hi....
sorry for late reply....
here u r selecting filepath in query....
so, .. your data reader will give you only path of that file...
if you want to open u need to download on client machine .. at that time it will give option for save or open file....
OR .................. OR ............... OR .............
Use System.IO and using this class create streamreader and read file ....
.....
Try ... this....
- Best of work...........
|
|
|
|
|
hello frnd,
i have developed a application and wants to give the help facility to user like a internet explorer help when pressing F1
how can i developed a CHM using .Net
if any one knows then please help
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
We used to use HTML Help workshop to generate CHM in our project.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
|
I have a user-control (Menu-bar) on my page and on click of menu item on user-control, I have to raise an event and handle that event on my main aspx page. On the basis of that event I have work further. Please resolve my problem.
nikki
|
|
|
|
|
How about an XmlHttp Post to serverside and a Web Handler to recieve it?
|
|
|
|
|
i have a table in sqlserver2005 named emp.
where the coloumns of the emp table are as follows.
empid char(3),
empname varchar(20),
empaddrs varchar(20),
empDOB dateandtime,
emp_no varchar(10)
i want to genertae emp_no as autogenertaed sequencitial number.
where the format of the auto genertaed number for emp_no will be - "id-yyyy-nnnn"
where 1st 2 places are the no of his emp_id i.e 01 or 02 like that
2nd four palces are the year of DOB i.e 2001,or 20005 like this
next four places are the numbers i.e 0001 ,0002 like this(it should be sequential number).
example of auto generated number are-0120010001,0219990002, 0320000003.and so on..
how will i generate this type of sequential no in asp .net (backend vb.net.)
when ever i save a record for a particular employee after giving the data in the front end of their corresponding textboxes, the emp_no should be generated in the database and stored in the emp_no coloumn of emp table.
(i know only how to generate auto num.by setting its identity to true.but dont know what to write in the formula filed so that i can genrate the above type of auto generated number)
thanks in advance
|
|
|
|
|
hi....
i understand your qus... but want to ask following....
1. is emp_id is same as sequential number....
2. u have taken emp_id char(3) then why it is 01,02,.....
just clear these .....
ok....
|
|
|
|
|
ya i have taken emp_id as char(3) so that while i entry the value 01 in the front end it should be taken as 01 not1. if i will take emp_id as int then if i input 01 it wil take 1 only. thats why i have taken as char.
No emp_id is not a sequential no..it can be any number..
sorry 4 d late response
|
|
|
|
|
i have a checkboxlistitem.where let say A,B,C,D,E are the items in that control.
and below that 5textboxes are there named as textbox1,textbox2......textbox5.
initiallay all textboxes are disabled.now i want when ever i select A the corresponding checkbox should be enable i.e textbox1.
and likewise if i select B then textbox2, if Dthen textbox 4.likewise.
what will be the vb.net code for it.
(i have tried with if and elseif but its not working. as when the 1st condition is satisfied its coming out of the loop.)
|
|
|
|
|
hello...
Try this out ...
I had done in C# and convert it to vb
Protected Sub CheckBoxList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
For i As Integer = 0 To CheckBoxList1.Items.Count - 1
Dim txt As String = ""
If CheckBoxList1.Items(i).Selected Then
txt = CheckBoxList1.Items(i).Text
Select Case txt
Case "A"
TextBox1.Enabled = True
Exit Select
Case "B"
TextBox2.Enabled = True
Exit Select
Case "C"
TextBox3.Enabled = True
Exit Select
Case "D"
TextBox4.Enabled = True
Exit Select
Case "E"
TextBox5.Enabled = True
Exit Select
Case Else
Exit Select
End Select
Else
txt = CheckBoxList1.Items(i).Text
Select Case txt
Case "A"
TextBox1.Enabled = False
Exit Select
Case "B"
TextBox2.Enabled = False
Exit Select
Case "C"
TextBox3.Enabled = False
Exit Select
Case "D"
TextBox4.Enabled = False
Exit Select
Case "E"
TextBox5.Enabled = False
Exit Select
Case Else
Exit Select
End Select
End If
Next
End Sub
|
|
|
|
|
when ever i select A the corresponding checkbox should be enable
TextBox or CheckBox ??????
apply all checkbox's ID as "amenities"
and textboxes id like Amenities0,Amenities1,Amenities2,Amenities3.........
<br />
function clickAll(e) <br />
{<br />
var txtId="amenities";<br />
<br />
<br />
for (var i = 0; i < e.form.elements.length; i++) <br />
{<br />
<br />
if (e.form.elements[i].name == "amenities") <br />
{<br />
txtId+=i;<br />
<br />
if(e.form.elements[i].checked == true)<br />
{<br />
document.GetElementById(txtId).style.display="block";<br />
}<br />
else<br />
{<br />
document.GetElementById(txtId).style.display="none";<br />
}<br />
}<br />
}<br />
return true;
} <br />
<br />
If you got any error try to solve your self
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi,
I am trying to create a dynamic connectionString with windows authentication. I prepared like this
"Integrated Security=SSPI;Initial Catalog=northwind;Data Source=server-Name"
It is running good from my application. I configured this application in IIS
and ran like this 'http:/localhost/ApplicationName' but it is failed to login.
How to run an application with windowAuthentication connectionString from IIS?
Thanks
Hari
|
|
|
|
|
Go to the properties dialog of your web application in IIS. Check whether integrated windows-authentication is enabled or not. and check whether anonymous is disabled or not...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
Thanks for your reply, and I did the same thing which you suggested but it failed to do the trick. Is there any other solutions. Please forward me.
Thanks
Hari
-- modified at 2:06 Monday 3rd September, 2007
|
|
|
|
|
maybe. you may try to impersanate...
Put this in web.config.
<identity impersonate="true" />
You have the administrator right in that machine... right?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
Thanks for your quick reply.
Yse. I have administrator rights in my system.
I added impersonate in web.config file..
<system.web>
............
............
<identity impersonate="true" />
</system.web>
Again no use....any other Michael?
Thanks in advance
Hari
|
|
|
|
|
When are you getting this error? What error are you getting??
Are you getting this error while you are trying to log-in from browser? OR while you are trying to open the connection?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hello Everyone ,
how to get data from database using web services concept in asp.net 2.0
with c#..
Please suggest different methods like using gridview etc...with step step by process..
Many Thanks
VIJAY
|
|
|
|
|
dhulipudi wrote: how to get data from database using web services concept in asp.net 2.0
with c#..
Do you know to get values from database on an ASPX page ? If yes, your question doesn't make any sense. The same way you can fetch information from webservice also. But when returning a set of data from webservice to your application requires a serialized class. Some classes in ADO.NET are not serialized.
dhulipudi wrote: Please suggest different methods like using gridview etc...with step step by process..
You won't be able to use gridview/datagrid in webservice. These controls are meant for providing user interfaces. Webservice would be a set of functions that resides on the remote server.
|
|
|
|
|
Thank You ,
can u give me a example on how to get data from database, useing web services.
Vijay
|
|
|
|
|
dhulipudi wrote: can u give me a example on how to get data from database, useing web services.
I presume that you are familiar with webservices.
1 - First create a webservice method
2 - Use SQLClient name space for SQL database
3 - Create connection using SQLConnection
4 - Create command object using SQLCommand
5 - Write query and fetch data
6 - Return data.
|
|
|
|
|
Thank You,
I am not familiar please can u give some good examples then i can
understand clearly, and i can do...
Vijay
|
|
|
|
|
Hi All,
I have two connection entrie in my web my web.config named projects_connection, and customer_connection.
Using VB, in the code behind for my aspx, how can I call the either project_connection or customer_connection from web.config and make the connectionstring for my data objects ie datareader, command object etc?
Thanks!
Nanfa
|
|
|
|