|
Hi All,
I have a WebForm in which I have 3 combos, a textbox and 2 button save and Add.From combo I select the Project Name, 2nd combo has tab name and 3rd combo has the control name (ex: textbox, checkbox, combo etc)and from textbox I take field name.When I click on Add button all the fields should be display in Gridview and when clicked on save button it should saved in database.
Next when I select the project name I need to fetch the related data from Database and display on GirdView.Suppose I select Porject as ABC and it has tab name as General Info,Tax Info and YQA.In General Info it has 2 textbox and one combo.
Then the General Info Form for project ABC should have both textbox and combo in GridView with the field name.This form will be new form.
Here I have to design the form at the runtime which project name has which controls so I need to create controls dynamic and bind it with GridView so that its display is properly.
Please tell me how to do this.
Thanks in advance....
|
|
|
|
|
hi!
i m developing EMail client in C# asp.net web application using kerio mail server.
I have sent and received emails using SMTP and POP3 dlls.But i dont know how to add new user of particular domain on my server using c#.
Plz reply soon
thanx
|
|
|
|
|
Please stop cross posting.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
In my web page I have created a PivotTable using vbscript.
I have 4 columns Name,Page,Url and Hits where Hits is a numerical column.
When the page is loaded the Table sorts by the First column Name but I want it to be sorted by the last numerical column Hits.
How do i do that.
Please help.
Thanks in advance
Babli
|
|
|
|
|
Hi!
I am trying to figure out how to create a bit of code that will save/copy an image from a webpage URL to a folder on a local directory or network directory. The URL will be predictable and the local directory will be constant. I just need help with the code that actually saves the image.
What I have tried so far:
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "http://www.whatever.com/test.gif", "C:\temp\test.gif"
I am not sure if I have coded this wrong, or if this code will even do what I need. Also, I am not exactly sure how to implement this code. Would this be run in an HTML file?
I am a complete programming noob so, thanks for your help!
Tim
|
|
|
|
|
The file system doesn't undestand the http protocol. Use a WebRequest object or a WebClient object to request the file.
---
single minded; short sighted; long gone;
|
|
|
|
|
I am running a asp.net applicatin in localhost. In one aspx file I got Line: 1, Char: 99, Error: Unterminated string constant error message, the wierd thing is when I run it from web server the exactly same code, its perfect. Is it possible that I need to configure something in my local machine, can someone please help, Thanks in advance.
|
|
|
|
|
Hi there:
I'm not sure...Just a suggestion: first you try to clear all offline files...To know exactly the js error, should using firefox...
<< >>
|
|
|
|
|
thanks for your reply, tried firefox and it even wont show me the page, the page is full of old javascript which isn't supported by firefox.
|
|
|
|
|
Hello,
Does anyone have a code snippet for adding a blank row at the end or top of the gridview on a button click?The button is outside the GV and not in the footer.
I did it in datagrid and I guess it was easier.But for gridview it isn't working. I will post my little snippet but it is giving me error:
Protected Sub btnadddriver_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnadddriver.Click
DriverGV.DataBind()
Dim ds As DataSet = DriverGV.DataSource
Dim blank As System.Data.DataRow = ds.Tables(0).NewRow()
ds.Tables(0).Rows.InsertAt(blank, ds.Tables(0).Rows.Count)
DriverGV.EditIndex = ds.Tables(0).Rows.Count - 1
DriverGV.DataBind()
End Sub
The error I am getting is :
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object
Line 16: Dim blank As System.Data.DataRow = ds.Tables(0).NewRow()
If someone has a working snippet for adding a blank row to the gridview can you kindly help me?
I'm on Visual Studio2005,Asp.Net2.0,VB
Thanks.All help is much appreciated.
Aartee.
...HE is watching Us All!
|
|
|
|
|
|
Basically a have a link set in the appsettings section of the web.config file. I want to read the value from the aspx page if possible without even creating code behind function.
<<asp:hyperlink id="lnkSecureHome" style="FONT: bold 8pt Arial; COLOR: #067606; vertical-align: top; padding-right: 15px;" Runat="Server" NavigateUrl='<%=System.Configuration.ConfigurationManager.AppSettings("AppsHomePage").ToString %>' >Home<</asp:hyperlink> This fails as it literally points to 'http://localhost/...%3c%25=System.Configuration.ConfigurationManager.AppSettings...'.
However,
<<td>
<<%=System.Configuration.ConfigurationManager.AppSettings("AppsHomePage").ToString%>
<</td> works as expected displaying the value.
How do I set the property with in the html of an aspx page?
I know I can set the value in the form_load event but just curious how you do it from the html.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
I haven't done any ASP.NET. However, what happens if you take the Runat="Server" attribute out? It seems to me that is the main difference between the two examples.
Regards
Andy
|
|
|
|
|
i created one webform in c# that contains login name and password if u r eligible person then the redirect form will be come.i hav a problem for this redirect page..i want to knoe the login time from the user.can u help me???
sureshkumaran
|
|
|
|
|
hi,
just try this:
after entering the user id & Pwd, just use this code to know the user login time.
DateTime LoginTime= new DateTime();
LoginTime=DateTime.Now;
private string lstrUserID; // To hold login user id
private string lstrPassword; // To hold login Password
this.lblErrorMessage.Text = "";
lstrUserID = txtUserID.Text.Trim();// Get the Correct User Login Id
lstrPassword = txtPassword.Text.Trim(); // Get the Correct User Password
< write the code for validating the User>
if the credentials are valid (valid user) then, to redirect the user
Response.Redirect("MainMenu.aspx");
}
else
{
lblErrorMessage.Text = "Invalid UserID / Password";(//to display the error message i am using label here, just use according to ur page)
}
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
What is your problem of redirect page?
suresh008 wrote: i want to knoe the login time from the user.can u help me
just get the system date...
<< >>
|
|
|
|
|
Hi,
Got a really annoying problem with downloading a file froma web site.
My code is pretty straight forward:
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + resource.Filename.Replace(" ","_"));
Response.AddHeader("Content-Length", resource.FileSizeBytes.ToString());
Response.ContentType = resource.MIMEType; // "application/octet-stream";
Response.WriteFile(fileToDownload);
//Response.Flush();
//Response.Close();
Response.End();
(You'll notice indications of desperation - randomly commenting code out) I have tried with the actual MIMEType and the application/octet-stream type - same result.
The download fails, and actually downloads the first x bytes of the web page itself, as the following Fiddler trace reveals:
Many thanks for any help you can give.
Nathan
--------------------------------------------------------------------
HTTP/1.1 200 OK
Date: Mon, 12 Feb 2007 19:47:33 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename=Blue-LogoOnly.gif
Content-Length: 5329
Cache-Control: private
Content-Type: application/octet-stream; charset=utf-8
<title>
Work Connexions | Your Files
|
|
|
|
|
This code works for me (in my button click event handler):
<br />
Response.Clear ();<br />
Response.ContentType = "application/octet-stream";<br />
Response.AddHeader ("Content-Disposition", "attachment; filename=\"foo.jpg\"");<br />
Response.WriteFile (Server.MapPath ("foo.jpg"));<br />
Response.End ();
|
|
|
|
|
I am trying to instantiate a class and am not able to do so (C# Visual Studio 2005).
In frm2, I wrote: private frm2 tmpfrm2; (This works in Visual Studion 2003 but not in 2005)
Help!
|
|
|
|
|
In Visual Studio 2005 if you go to Build menu you'll see an option for "Clean Solution". What exactly does this command do for us and also when should we use it?
Thanks.
Robert
|
|
|
|
|
It moves all the built libraries, executables, object files etc from the solution. Sometimes VS will get it's knickers in a twist with not updating the correct libraries etc and you can use Clean to force it to delete the old version and then next time it compiles you can (more or less) guarantee that the latest code / libraries will be used.
|
|
|
|
|
Hi Everyody,
I want to know what determines the maximum attachment size in an ASP2 web application.
I send an email from a web application & the attachment is about 2 MB.
Whenever I try to send it from the Visual Studio 2005 project,it takes much time then gives me an exception saying that it couldn't be sent & timed out.
It works normally in the VS 2003 application.
Any Clue??
Thnx a lot
|
|
|
|
|
Not sure if you are trying to attach the file from a web interface or if the file is located on the server.
If you are having the user upload the file as attachment then you might have to override the httpRuntime's maxRequestLength value in the web.config file.
By default ASP.NET only allows files with size 4MB [4096 KB] or less to be uploaded but you can change it like this:
<httpRuntime maxRequestLength="8192" />
|
|
|
|
|
Thanks a lot for your response..Actually the file is located on the server. Is there anything else I should change??
|
|
|
|
|
If file is located on the server then I would first check for common things like for instance if the file is locked or not, read access, other error handling code that might cause an infinite loop etc.
Post your code so we can see exactly how you are trying to attach the file. Thanks.
HTH
Robert
|
|
|
|