|
I think this is a difficult job.
What I have to do in my asp.net (3.5) website:
. The client select a file from his filesystem (actually a 512MB bin file from a dedicated SD card)
. A client script extract useful data from bin file and compress it (to minimize the amount of uploaded data)
. The file is uploaded to asp.net server
. The file is processed by the server (to read bin file data and insert it into a database)
So my real question : Is it possible to do this with asp.net/C# (or any other language) with a minimal user interaction?
Actually I've make it works but with a java applet, and it's not very intuitive and efficient. The user had to select the bin file, save it to a temporary compressed file (done by applet). And finally the user selects a new time the previously saved compressed file and upload it (asp:upload)...
So is it possible to do it with ASP.NET ? If yes (or I you have an idea) please just answer me.
Thanks for any answer.
BR
Le Sourcier
|
|
|
|
|
Hai,
I have a datagrid having 3 fields. The second field contains Link buttons ,When i am clicking that fields i want o get the cell value ie, I am storing some path like C:\abc\a1.wav in that fields,When i click that field,i want to get the path to a string.
The GridView Code is (Music_Path is the field name)
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False" datasourceid="SqlDataSource1" xmlns:asp="#unknown">
Style="z-index: 102; left: 301px; position: absolute; top: 187px" >
<columns> <asp:boundfield datafield="No" headertext="No" insertvisible="False" readonly="True">
SortExpression="No" />
<asp:templatefield headertext="Music_Path" sortexpression="Music_Path">
<edititemtemplate>
<asp:textbox id="TextBox1" runat="server" text="<%# Bind(" music_path")="" %>"="">
<itemtemplate>
<asp:linkbutton id="LinkButton1" runat="server" text="<%# Bind(" music_path")%>"="">OnClientClick="javascript:abc()">
<asp:boundfield datafield="Name" headertext="Name" sortexpression="Name">
and in the function abc i want to alert the path
Please check the databinding also ,i think it is having some problem
Thanksssssssssssss
|
|
|
|
|
you have not closed the link button tag and some syntax error in it.
|
|
|
|
|
Hi, thanks for looking
I have a shared hosting account on godaddy, i can host unlimited domains, But im having a "problem" when hosting another domain besides the root domain
This is what happens
Lets say i have a second domain (mydomain.com)
I can add this new domain to my hosting account, all i need to do is to link it to a folder inside the root folder in my hosting account, lets call this folder folder1
So i have this structure on my site:
root/ (here is where my main domain is)
root/folder1 (here is where mydomain.com is)
I can access it and it works fine, the problem is that when i use a menu control to enable the navigation, the menu items link me to:
www.mydomain.com/folder1/PageName.aspx instead of www.mydomain.com/PageName.aspx
Ive tryed using the link without the ~/ in the sitemap but it still gets the full url (www.mydomain.com/folder1/PageName.aspx)
This doesnt happen when i use links, even if i use ~/ to get the navigateurl
Is there any way to avoid this behavior of the menu control
I noticed that a dotnetnuke portal has the same behavior when i set it up as a secondary domain, it enters the site with www.sitename.com but once a menu item is clicked, it shows the www.sitename.com/folder/PageName.aspx
Thanks for any feedback
Alexei Rodriguez
|
|
|
|
|
how to session expire in programmatically in runtime.
Chandhu
|
|
|
|
|
chandhuBTS wrote: how to session expire in programmatically in runtime.
What does it mean ? Do you want to set Session Expire Time runtime? or Remove Session?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Use Session.Abandon()
The miracle is this--the more we share, the more we have.
|
|
|
|
|
Session.Abanded(); destroyed all session variable,
Session.Removed("Name_of_session_variable") its destroyed particular variable only
|
|
|
|
|
vnsraj wrote: Session.Abanded(); destroyed all session variable,
Session.Removed("Name_of_session_variable") its destroyed particular variable only
That's True, But his question was not clear that what he is expecting.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Gaurav K Singh wrote: Use Session.Abandon()
Why only Session.Abandon(),
Why not Session.Remove(),Session.RemoveAll(), or Session.Clear().
This realy makes difficult to give a correct answer if the question is not clear to all. That why I was asked him that what is his actual problem.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hai,
All that methods will clear the session but not the cache.That means after logout if we click the backbutton in browser,it will again go to the first page of the application,to avoid this need to write some other codes.Right??
may be this will do if we give this in the pageload event of the pages
private void Page_Load(object sender, System.EventArgs e)
{
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
}
|
|
|
|
|
Hi,
I have developed a web site in asp.net 1.1, but my web site session has expired within 2-4 min, I have set time out 60 mint in web.config and global.asx file.
I have checked many forum but didn't get right solutions.
need your experience;
Thanks
RAJESH
|
|
|
|
|
Check the IIS Settings , there is a place where you set your sessions
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Session may expire because of many reasons. IIS settings may cause problems or ASP.NET process recycles may cause problems. Make sure your ASP.NET worker process is not restarting frequently.
|
|
|
|
|
I have intergrated with Active Directory But i wana Give access to Groups in Active Directory...
I dont want HR group to access my page Only IT and other Groups in AD can access...
Can some one help and send me the code...
Login.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.DirectoryServices;
public partial class Login : System.Web.UI.Page
{
public string myEmployeeID;
protected void Page_Load(object sender, EventArgs e)
{
}
private bool Authenticate(string domain, string txtusername, string txtpassword)
{
bool authentic = false;
try
{
DirectoryEntry entry = new DirectoryEntry("LDAP://" + domain,
txtusername, txtpassword);
object nativeObject = entry.NativeObject;
authentic = true;
}
catch (DirectoryServicesCOMException) { }
return authentic;
}
protected void Button1_Click(object sender, EventArgs e)
{
string adPath = ConfigurationSettings.AppSettings["strADPathVar"].ToString(); ;
//Authenticate adAuth = new Authenticate(adPath);
try
{
string strDomain = ConfigurationSettings.AppSettings["strdomainVar"].ToString();
if (true == Authenticate(strDomain, txtusername.Text, txtpassword.Text))
{
string groups = "";
FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1, // version
txtusername.Text,
DateTime.Now,
DateTime.Now.AddMinutes(60),
false, groups);
// Now encrypt the ticket.
string encryptedTicket = FormsAuthentication.Encrypt(authTicket);
// Redirect the user to the originally requested page
Response.Redirect(FormsAuthentication.GetRedirectUrl(txtusername.Text, false));
}
else
{
lblError.Text = "Error: Unknown user ID or bad password.";
}
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
cheers
|
|
|
|
|
You can do one thing,
Get the group of every user from AD at the time of authentication and save the same in session.Then you can put the restriction on pages according to the gruoup he/she belongs on different pages.
|
|
|
|
|
Can you make a Code for One of Group in AD???
Im trying but could'nt succeed.........
sheeba
|
|
|
|
|
Post you code then it'll ne better to rectify your issue
|
|
|
|
|
I want to get the data of a row of a grid view through source code
by using a chek box
i m using the following code
<asp:GridView ID="GridView1" runat="server" PageSize="30" AllowPaging="True" BackColor="#FFE0C0" BorderColor="#6d042f" Border="1">
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:TemplateField >
<HeaderTemplate>
<asp:CheckBox ID="CheckBox2" runat="server" Text="select all" onclick="javascript:SelectAllCheckboxes(this);" ToolTip="click here to checked all checkbox"/>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle BackColor="#FFF0F7" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E5B9CA" Font-Bold="True" ForeColor="Navy" />
<PagerStyle BackColor="#6D042F" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#6D042F" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#E5B9CA" />
</asp:GridView>
|
|
|
|
|
Why I can't submit a article?
Error :
"
Author IDs need to be integer values. These are the IDs (not the email addresses) of those who will author the article.
Author can not be empty.
"
|
|
|
|
|
If you're too stupid to work this part out, perhaps you should wait a while before writing articles ?
The author id:
- cannot be empty
- is an integer
- is not your email address
It's kind of silly that you're asked to enter this, it should just get it from your login, I'd have thought. But, it's your CP user id. Mine is 6556, for example.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
I am looking for some information on creating a system that will store Form Layouts in a database. I see all kinds of web form creators on the market but I want to try to do it myself so I can customize it to my liking. Does anyone have any links or information on the best way to store the form layout in a database and just have a page get the layout and the submit action from the database and create a web form on the fly. Any help or guidance on this would be appreciated.
|
|
|
|
|
That depends upon what you want to save. If you want to save the flexible layout i.e. position and state then you can use WebParts. If you just want to save colours and fonst (look-n-fell) then just use Themes / Skins. and if you want to save all the things then you can use both.
You can use WebParts.i.e. create a webpart with some property, and asp.net will store all the properties associated with webpart in the sql server database. and it will retrieve and render the webpart according to the user logged in, when you redirect the use to that page.
I forgot ASP.Net Personalization and User Profiles[^].
modified on Monday, February 16, 2009 5:24 PM
|
|
|
|
|
What I am looking for is a way to give users the ability to design forms and save that layout to a database. For instance the user could place a textbox on the form, a checkbox, and a TextArea. I am looking for the best way to save that to a database so that when a user comes to a page and the form ID could be passed in the Querystring the form layout that is saved in the database would be displayed.
I was thinking something like a Forms table that would have the FormID in it an a table that would have the fields in it with the form ID they belong to and the layout of where they belong on the form and such. I see all kinds of Form Builders on the web with the ability to save that form somewhere. I am sure that is in a database somewhere? I just want users to be able to build forms dynamically and save them to a database so I don't have to keep building the forms for them.
|
|
|
|