|
But when a client wants to upload a file to the server. He needs to use the application. Is there any way to do that? If there are activex controls, can you please name them
|
|
|
|
|
If you are using .net 1.1 then you just use a control like this:
If you are using .net 2.0 then you can use the FileUpload control.
Hope that helps.
Ben
|
|
|
|
|
Please help me with this code
*************
Protected Sub ButtonSubMana_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonSubMana.Click
Dim ds1 As New Data.DataSet
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Dim NumberOfBoxes As Integer
Dim WhichBox As Integer
NumberOfBoxes = Integer.Parse(WhichBox)
Dim rows(NumberOfBoxes) As Integer
Dim Repeater1 As Repeater
For WhichBox = 0 To NumberOfBoxes
Dim txtDate As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDate"), TextBox)
Dim cmbProjectName As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectName"), DropDownList)
Dim cmbClientSite As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbClientSite"), DropDownList)
Dim cmbProjectManager As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectManager"), DropDownList)
Dim cmbProjectMember As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectMember"), DropDownList)
Dim cmbCategory As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbCategory"), DropDownList)
Dim cmbOccupation As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbOccupation"), DropDownList)
Dim txtHours As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtHours"), TextBox)
Dim CheckBox1 As CheckBox = CType(Repeater1.Items(WhichBox).FindControl("CheckBox1"), CheckBox)
Dim txtDescription As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDescription"), TextBox)
obj.addTimesheet(txtIDNumber.Text, cmbProjectName.SelectedItem.Text, cmbClientSite.SelectedItem.Text, cmbProjectManager.SelectedItem.Text, cmbProjectMember.SelectedItem.Text, cmbOccupation.SelectedItem.Text, txtDate.Text, Double.Parse(txtHours.Text), txtDescription.Text, CheckBox1.Checked, cmbCategory.SelectedItem.Text)
Next
Dim Manager_Id(0) As Integer
Dim Timesheet(0) As String
Dim i As Integer
For i = Manager_Id To Timesheet
Manager_Id(i) = Manager_Id(i - 1) + Manager_Id(i - Timesheet)
Next
Me.DataSource = Manager_Id
Me.Repeater1.DataBind()
Dim from As MailAddress = New MailAddress("boipelo@ecominstitute.com", "Boipelo Mothusi")
Dim recieve As MailAddress = New MailAddress("sydney@ecominstitute.com", "Synney Masobuka")
Dim message As MailMessage = New MailMessage(from, recieve)
message.Subject = "Using the SmtpClient class."
message.Body = "Using this feature, you can send an e-mail message from an application very easily."
'Dim copy As MailAddress = New MailAddress("Notification_List@contoso.com")
'message.CC.Add(copy)
Dim client As SmtpClient = New SmtpClient("srjhbex01", 25)
client.Send(message)
'If message.To Then
' UserMsgBox("Successfully add")
'End If
End Sub
************
when I chick Button Manager1.information captured in the repeater,be save.It is saving I don't have problem with it.2.Msg to pop-up ,to alert the user that the information has been sent(doesn't work I really don't know what the problem).3.I now have a PROBLEM OF GROUPNG ARRAYS SO THAT,WHEN THE USER CLICK ON THAT BUTTON,IT MUST SEND ONE E-MAIL TO DIFFERENT Project Manager,(for e.g if I captured 2 TimeSheet ,when I click the button send only one mail to the manager not 2,to alert him that there are nwe timesheet need to be approved)
oga m
|
|
|
|
|
Hello
I've posted the question already, but i get no answer. Maybe it was not clear, what's my goal. Thats why I ask again (a bit different;)).
I'm sure most of you know myspace.com. There it's possible to visit a userprofile directly over doaminname/username (e.g. http://www.myspace.com/username). I want to build something like this for my own website. I red about URLRewriting, to change the URL into the global.asax (Application_BeginRequest). But this is only possible, when the Directory whith the specific username exists, and into it, there have to be a default.aspx File. Is this right?
Do I really have to create all these Directories and Files? Its not a big work, but it doesn't look really nice.
I thought also about the possibility to change the 404Error File into an .aspx File and handle it there. Is this the solution?
Or which is the right/professional way?
Best regards
succo
|
|
|
|
|
No part of the path needs to exist (except for the domain of course). Here's some code from a URLRewriter I wrote recently (it sets UICulture based on a url) that hopefully gives you enough hints on how to do this. If you still have questions, send me an email at support [at] stratelogics [dot] com and I'll help you out.
<code>
public class URLRewriterHttpModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.BeginRequest += new EventHandler(context_BeginRequest);
}
public void Dispose()
{
// TO DO: Dispose resource if required
}
private void context_BeginRequest(object sender, EventArgs e)
{
HttpRequest request = ((HttpApplication)sender).Request;
HttpContext context = ((HttpApplication)sender).Context;
string applicationPath = request.ApplicationPath;
if (applicationPath == "/")
{
applicationPath = string.Empty;
}
string requestPath = request.Url.AbsolutePath.Substring(applicationPath.Length);
LoadCulture(ref requestPath);
context.RewritePath(applicationPath + requestPath);
}
private void LoadCulture(ref string path)
{
if (path.Contains("_e.aspx"))
{
// Set culture to English and remove _e from filename
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-CA");
path = path.Replace("_e.aspx", ".aspx");
}
else
{
if (path.Contains("_f.aspx"))
{
// Set culture to French and remove _f from filename
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-CA");
path = path.Replace("_f.aspx", ".aspx");
}
else
{
// Leave culture as is and don't modify filename
}
}
// Set the UICulture to match the Culture
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
}
}
</code>
Dont forget to put this in your web.config's system.web section:
<httpModules>
<add name="URLRewriterHttpModule" type="URLRewriterHttpModule, App_Code"/>
</httpModules>
|
|
|
|
|
thanks for your answer, works great! first I've forgotten to add the extension for everything (*) to the IIS.
|
|
|
|
|
i want code for crating dynamic check boxes in panel. and i need to store the id's of checked when i click submit button.
please any one can send me code or any URL please
this is haneef
|
|
|
|
|
I will created dynamic check boxes in panel but it losing the checked values when i reloads
Example :
no problem with bind data but when i click submit i need to reload the binddata() definitely other wise panel doesn't show any items.
if i reload then checked values are losing when i calling the submit button.
sub binddata()
dim ds as dataset // here i will take data source from which from database.
Try
ds=obj.GetSource()
For index = 0 To ds.Tables(0).Rows.Count - 1
chklist = New CheckBox
chklist.Text = ds.Tables(0).Rows(index).Item(0).ToString
chklist.ID = ds.Tables(0).Rows(index).Item(0).ToString
chklist.EnableViewState = True
Panel1.Controls.Add(chklist)
Panel1.Controls.Add(New LiteralControl("
"))
Next
end sub
problem below when i reloads the databind(). but i need to be definitely reloads the databind other wist panel doen't show any thing
Private Sub submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submit.Click
While index < ds.Tables(0).Rows.Count
DisplayPanel = CType(FindControl("panel1"), Panel)
chklist1 = CType(DisplayPanel.FindControl(ds.Tables(0).Rows(index).Item(0).ToString), CheckBox)
If Not chklist1 Is Nothing Then
chklist1.Text = ds.Tables(0).Rows(index).Item(0).ToString
If chklist1.Checked = True Then //here showing that not checking even thought i will check check boxes
objWeb.Addid(drlist.SelectedItem.Value, chklist1.ID)
End If
End If
index = index + 1
End While
end sub
this is haneef
this is haneef
|
|
|
|
|
Hi Hafneef,
Are you saving values of check box i.e in database or XML file .
You need to save check box values and when you reload them dynamically then you need to put those values into check boxes.
Tip:
Check if you are missing "Ispostback"
|
|
|
|
|
how can we use datagrid in another datagrid in 2003
|
|
|
|
|
under the template column add an item template and within that you can have one more datagrid!
the logic of binding the data in the inner datagrid should be wriiten in itemdatabound event of the outer datagrid
Gautham
|
|
|
|
|
just do a search for nested datagrid...
<< >>
|
|
|
|
|
hi. i am creating a website which is related to music. Can anybody tell me how to play audio file in asp.net 2003. i also want to know how to select diffrent files from database or a particular location. please help me. thanks
KIRTI
|
|
|
|
|
Hi Kirti.
I'm afraid I don't fully understand your question. Are you just looking to play a background audio file when the user comes to a particular web page? If so, try the following link:
http://www.tips-tricks.com/sound.asp[^]
Can you please be more specific about what you're trying to accomplish?
Thanks.
-Goalie35
|
|
|
|
|
|
hi,
could someone please help with a (hopefully) simple question.
I'm trying to hide various elements on my asp.net web app page (I'm using c#), this is not a problem, i just use elementname.visible = false;
However, this seems to leave the element taking up space on my page which I don't want. Is there another way of doing it? Like for validation controls which have the display property set to dynamic or static? without using css? or if i do have to use css how do i change the class using something similar to the .visible method?
please help
many thanks
mark
ps. Im using VS 2005
|
|
|
|
|
Mark,
You can use a panel control.
Place your elements in your panel and later when required the panel should be made visible false, this should avoid your spacing problem.
Rate the message!
Gautham
|
|
|
|
|
wow, thank-you.
Don't know why i didn't think of that, thats me out of a tight spot
cheers for the speedy reply
mark
|
|
|
|
|
Welcome anytime!
Sometimes it happens, part of the coding life.
Happy Coding!
Gautham
|
|
|
|
|
A better solution is to use a placeholder control. That is what the placeholder control is made for.
Ben
|
|
|
|
|
kubben wrote: That is what the placeholder control is made for
no, it's not
Use the PlaceHolder control as a container to store server controls that are dynamically added to the Web page.
only two letters away from being an asset
|
|
|
|
|
You are right. I guess I should have looked closer at the original post. Thanks for the correction.
Ben
|
|
|
|
|
Hi,
I have created my grid view using the <asp:TemplateField> for all the columns.
Now I wish to Sort the corresponding Column wise, when I click on the respective Column Header (Its LinkButton Control).
How efficiently I can able to do this? Suggest me the idea behind this.
Regards,
Jay
|
|
|
|
|
You have to give SortExpression for each template.
SortExpression="USER_MASTER.USER_LEVEL_ID desc"
And on event sorting you have to use it in sorting event
like : e.SortExpression
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
hi mayank could u give me that sorting event full code
Thanks in Advance
|
|
|
|