|
pontonet wrote: Does anybody know if there`s a limit to the form post method?
There is of course some limits. Perhaps you can't have more than 65535 fields in the form, or each value can not be larger than 4 GB, but you certainly have not reach any limits like that.
There might be an error in the page. Perhaps you have placed some form fields outside the form that is submitted. If you have more than one form on the page, only the fields inside the form that is submitted will be sent to the server.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I am using ASP.NET 2.0 with themes in my web application. Each theme has it's own set of similar stylsheets.
If I have certain stylesheets that are used on every page and certain stylesheets that must only be used if it is IE6 or IE7, how do I specify this if all stylesheets are "imported" automatially into the web page?
Normally you would test like this in the web page:
How do I do such a test if all stylesheets are "imported" automatially into the web page?
I hope someone can help me.
Regards
ma se
|
|
|
|
|
Hi All
Working with GridView I am facing problems.
1. The GridView is expanded when I Editing it. I've tried EditRowStyle wrap and width properties but no solutions.
2. How can I Insert a combo box in Edit mode of Gridview. So user can select items while Editing the gridview.
One more thing I want to include that I am not using sqlDataSource for binding the GridView, Actuall I am creating a DataTable runtime based on that GridView' rows and attached to GridView.
I am inserting data into GridView using different operation that is AddRow
Hope It is sufficient to understand.
Thanks in advance
Bye
__________________
I am using .NET 2.0 (VS 2005)
axn
I am using .NET 2.0 (VS 2005)
|
|
|
|
|
1. You will probably need to change to Template columns. That way you can control the size of the controls. so your labels are getting changed to text boxes. If you use template columns you can set the width of the label to match the textbox or set the width of the textbox to match the label.
2. Again using a template column you can delete the existing textbox and put a combobox there instead.
Hope that helps.
Ben
|
|
|
|
|
I not using Template column, As I told before I am creating Table runtime and attaching it to the gridview.
I am a newbie in asp.net, So please tell me is it possible to use Template column without having datasource attached to it.
IS it not possible to do this without Template column??
Hope to get early respone. Thanks in ADvance.
-- modified at 11:18 Wednesday 2nd May, 2007
axn
|
|
|
|
|
|
my problem: this works fine in a asp.net project, but not in a winform project, so can anyone help me to "convert" this?
<br />
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)<br />
{<br />
bool Authenticated = false;<br />
Authenticated = SiteLevelCustomAuthenticationMethod(Login1.UserName, Login1.Password);<br />
e.Authenticated = Authenticated;<br />
if (Authenticated == true)<br />
{<br />
Response.Redirect("Overzicht.aspx");<br />
}<br />
}
|
|
|
|
|
Hi,
By winforms project, do you mean Windows Forms project(Windows application),
just curious.
Blumen
|
|
|
|
|
yes, i mean windows forms project, sorry
can anyone help me?
|
|
|
|
|
daviperke wrote: this works fine in a asp.net project, but not in a winform project, so can anyone help me to "convert" this?
What exactly is the problem? Are you trying to open a webpage from your winform?
daviperke wrote: Response.Redirect("Overzicht.aspx");
This shall work only in web forms. Your trying to redirect to a webpage from your winform, which cannot be done this way.
|
|
|
|
|
well, i want to use this code in my windows application, and it has nothing do to with the ASP.NET website anymore:
<br />
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)<br />
{<br />
bool Authenticated = false;<br />
Authenticated = SiteLevelCustomAuthenticationMethod(Login1.UserName, Login1.Password);<br />
e.Authenticated = Authenticated;<br />
if (Authenticated == true)<br />
{<br />
Response.Redirect("Overzicht.aspx");<br />
}<br />
}<br />
<br />
private bool SiteLevelCustomAuthenticationMethod(string UserName, string Password)<br />
{<br />
bool boolReturnValue = false;<br />
<br />
string strConnection = "server=blabla;database=db;Integrated Security=SSPI;";<br />
SqlConnection Connection = new SqlConnection(strConnection);<br />
String strSQL = "Select * From tblPersoneelslid";<br />
SqlCommand command = new SqlCommand(strSQL, Connection);<br />
SqlDataReader Dr;<br />
Connection.Open();<br />
Dr = command.ExecuteReader();<br />
while (Dr.Read())<br />
{<br />
if ((UserName == Dr["emailadres"].ToString()) & (Password == Dr["paswoord"].ToString()))<br />
{<br />
boolReturnValue = true;<br />
}<br />
Dr.Close();<br />
<br />
return boolReturnValue;<br />
}<br />
return false;<br />
}<br />
so when a user logged in correctly, he has to go to the page "frmMain.cs".
So the only think i ask is to help me a bit with "converting" the asp.net code into code i can use in my windows application.
|
|
|
|
|
In your btnLogin click event, create an object of frmMain and open it if the authentication is correct.
private void btnLogin_Click(object sender, System.EventArgs e)
{
frmMain objForm;
if(SiteLevelCustomAuthenticationMethod(txtUserName.Text, txtPassword.Text))
{
objForm = new frmMain();
objForm.Show();
}
}
Try to read articles on winforms. And post any related questions in c# of windows forms forum.
|
|
|
|
|
BTW delete the duplicate post.
|
|
|
|
|
I am currently having a few problems with a grid view I am working with. The gridview is set up to display a list of calls that have been received. This is populated via a view on the sql server database. I have a number of options on the page that I can filter the gridview on. The ides is that the user can click on a dropdown list and select some options and then click a button ‘apply’ which then composes a new query I then set this string (msg) to be the select command of the gridview using…
sqlGridView.SelectCommand = "SELECT * FROM [uvw_supportcalllist] " & msg <br />
GridView1.DataBind()
This applys the filter brilliantly…all is well and good so far. However I have set the paging attributes to true and set the pages length thing to be 20 now if I apply my filter like above and then go to the next page I lose my applied filter.
I realise I am missing something somewhere, I have attempted to call databind again in the paging event of the page but that doesn’t work. Can someone help me out? Am I applying my filter wrongly? Or is there a better of paging the gridview? Any help would be most appreciated.
Cheers
Ian Caddick
|
|
|
|
|
I am guessing there is a pretty good chance that you are doing an initial load in the page load event? If you have code like that you need to check to see if the page load is a postback or not. You would only want to call that code on the first page load, not on a post back which is what happens when you page. So check the IsPostback property of the page. You code would be something like:
If (!IsPostBack)
{
//Initial bind code here
}
Hope that helps.
Ben
|
|
|
|
|
Thanks but no, I already do that
I am in vb but its the same thing I do
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load<br />
If Not IsPostBack() Then<br />
Initialise()<br />
End If<br />
End Sub
Thanks for trying tho
Cheers
Cads
|
|
|
|
|
Hi all,
I am sending emails with attachments through my application.For this purpose i need to save the attachments on the server , attach them and then delete after sending the mail.The problem is i am not able to set the write permissions on the webapplication since there is no Security tab in the WebApplication folder`s properties.How can i bring in the security tab or is there any other method of giving write perm.
|
|
|
|
|
Look for 'simple file sharing' in your folder options and turn it off to get the securities tab.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your reply.It worked!!!
I conveyed the same to my team member.But the group name "Everyone" which applies to all is absent on his machine without which the same error "Access denied" reappears. Isn`t it possible to give write permissions to a single owner which should work.
Note: I am working with .NET 2003.
|
|
|
|
|
John Mecas wrote: Note: I am working with .NET 2003.
That doesn't matter, we're working with the file system here.
You can add any user to the folder permissions, in that dialog, including the 'Everyone' user.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have a gridview with a few bound fields and 2 checkboxes in template fields.
I have some filter fields which go in a placeholder on the page e.g. Disabled and Deleted checkboxes
When the user initially enters the stored procedure executes and returns the complete list.
When a user checks disabled in the filter and hits submit the page reloads executes the stored procedure and returns the items that are disabled.
My binding code is as follows:
<br />
daUserList.Fill(dtUserList)<br />
gvUserList.DataSource = dtUserList<br />
gvUserList.DataBind()<br />
<br />
Protected Sub gvUserList_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvUserList.RowDataBound<br />
<br />
Dim chkDisabled As CheckBox = CType(e.Row.FindControl("disabled"), CheckBox)<br />
Dim chkDeleted As CheckBox = CType(e.Row.FindControl("deleted"), CheckBox)<br />
<br />
Dim dataRow As DataRowView = e.Row.DataItem<br />
<br />
If dataRow IsNot Nothing Then<br />
chkDisabled.Checked = dataRow.Item("disabled")<br />
chkDeleted.Checked = dataRow.Item("deleted")<br />
End If<br />
<br />
End Sub<br />
Now when the page first loads the checkboxes are populated correctly but when I submit filter options the page reloads with the new results but with checkbox values appearing as they did in the previous view.
I've set EnableViewState="false" on the form, the gridview and the checkboxes but no joy.
Also when I debug the checkboxes are being set correctly so it must be something that is happening after the RowDataBound event that is resetting the new checkboxes with values from the checkboxes in the previous full list.
This is so frustrating, it's the last issue in my project, I've already spent a day on it and it's starting to make my project overrun!
Please, can anyone shed any light on what is happening before I start going grey?
Many Thanks,
Paul
The Website Shop
|
|
|
|
|
I don't know if this will help you at all, and bear with me as I am very much a beginner, but I am using a checkbox field in my gridview as well, however I didn't create it the way you have I used an Item Template and whacked in the checkbox on the page there, something like this
<asp:TemplateField HeaderText="Open" SortExpression="active">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("active") %>' Enabled="False" />
</ItemTemplate>
</asp:TemplateField>
the active field that i am binding on is a simple int field in the database with either 0 for unchecked and -1 (although i believe and int will do cept 0)for checked. Dunno if that helps you out any?
Cheers
Ian Caddick
|
|
|
|
|
Hi,
Thanks that's what I have
|
|
|
|
|
Check, r u updating the data before populating (loading) again?
Regards
R.Arockiapathinathan
|
|
|
|
|
No,
I am simply reloading the page, executing the stored procedure to return a subset of the original view and then databinding those results to the gridview.
I use the gvUserList_RowDataBound event to tie up the checkboxes after the bind but even though it seems to all happen correctly in debug when my page is redisplayed it looks as though the checkboxes have picked up the values from the previous view, even though I have Enableviewstate="false" in the page directive, on the form, gridview, and controls themselves.
Any idea what is happening?
|
|
|
|