|
I am having two DetailsView both are in update panel,and the objective of 1stDetails view is to Add Category and the 2nd is to Add subcategory.I have used a Dropdown list to select Category in 2ndDatalist.But Failed to Rebind the dropdown list Afetr immediate Category addition. I have alredy used Updatemode=Conditional,and ScriptManager.GetCurrent(Me).RegisterPostBackControl(datalistName) as i have to Upload image for both category and SubCatecory.
Any type of help is appreciated.Thanks
|
|
|
|
|
We are designing an application in which a large number of forms with predefiend text have to be presented to the user and the user has to fill in the desired values and post it back to the application. The following 2 solutions are there in my mind :
1. We could have used directly pdf in browser and get the user entered data posted back to the application for processing.
2. Adobe Forms Server (but the S/W is not with me so can't decide on it)
The primary requirements are :
1. The user should be presented with the form in the way he should be able to print it.
2. We need to have control on whether the user can save/print the form or he cannot do so.
3. There may be a need for the form to be presented back to the user at a later stage, with the data filled in by him through an application generated ID.
Thanks,
Sundeep
|
|
|
|
|
Sundeep Moudgil wrote: We are designing an application in which a large number of forms with predefiend text have to be presented to the user and the user has to fill in the desired values and post it back to the application. The following 2 solutions are there in my mind :
1. We could have used directly pdf in browser and get the user entered data posted back to the application for processing.
2. Adobe Forms Server (but the S/W is not with me so can't decide on it)
The primary requirements are :
1. The user should be presented with the form in the way he should be able to print it.
2. We need to have control on whether the user can save/print the form or he cannot do so.
3. There may be a need for the form to be presented back to the user at a later stage, with the data filled in by him through an application generated ID.
Thanks,
Sundeep
I'm sorry. Is there a question in there?
As much as it pains me to say this, have you tried InfoPath?
I didn't get any requirements for the signature
|
|
|
|
|
Thanks for your reply.
My question is what would be the best approach in such a scenario?
I am aware of only these 2 options mentioned by me :
1. We could have used directly pdf in browser and get the user entered data posted back to the application for processing.
2. Adobe Forms Server (but the S/W is not with me so can't decide on it)
In the first one I am not aware of how I can control the toolbars display for achieving the flexibility to programatically decide is the save / print options are to be encabled or not.
As for the second one, I have formed my understanding on the basis of whatever I have read, but have never used it and since I don't have this S/W so can't clearly decide if that will be the recommended solution.
Of these 2 approaches is there a better approach also?
Also for option 1 , how can I achieve the flexibity that is required ?
I have not used InfoPath..
|
|
|
|
|
Hello all,
I am searching for control which control is more faster to display data from database.
currently I am using repeater control and data grid view.
and some time I get data with help SqlCommand and Sql addapter I though it is more fast.
If I create a custom control and use response.Write it will fast?
If you have any suggestion than please share with me.
Regards
|
|
|
|
|
Data Adapters are slow, databinding is slow, data binding using DataBinder.Eval is really slow.
Get the data via a Data Reader, stuff it into a custom object, and then render the page using a repeater control without using DataBinder.Eval and I think you will notice a fair, maintainable improvement.
Also, how much data are you trying to display? Retrieve the smallest amount possible for the given screen and rendering only the required elements is another avenue for speed improvements.
|
|
|
|
|
Your main bottleneck will probably not be the repeater, response.write or gridview.
If you can, cache the data. I wrote an article with an easy way to do that http://www.codeproject.com/KB/aspnet/LookUpDataCache.aspx[^]
You main bottleneck will probably be the SQL query, not the serialization of the data.
Also, if you use the repeater or gridview's itemdatabound event that will be faster than setting the data in the mark up. Because the mark up has to use reflection to get the data type.
I didn't get any requirements for the signature
|
|
|
|
|
Iam using Vb through excel.
iam using K-means clistering for segmenation using one parameter( diatance).
please hekp me .
thanks in advance.
|
|
|
|
|
Dear All,
iam having an application in which there are Asp.net and Classic Asp pages
i have created two Session variables one for Asp.net and other for Classic Asp
i have set session time out of 2 mins in IIS setting
now i check the Session fot both Asp .net and Asp but after the Define time interval dotnet session expire but classic Asp session is alive
can u help me out of the Problem
My classic Asp session is not getting expire after define time interval
|
|
|
|
|
Hi,
I have written the code for display popup window using javascript in button onclient click event.
<asp:button id="Button1" runat="server" style="position: static" onclientclick="openwindow()" xmlns:asp="#unknown">
Text="Execute"/>
function openwindow()
{
window.open("AssignedTickets.aspx",'window','width=630,height=620,background=silver,menubar=no, resizable=no')
}
And I want to pass parameters to that popup page because there are some search parameters i need to pass those to popup page and display the results in popup page.
Please anybody help me how pass parameters using javascript.
Thanks in Advance
Pavani
|
|
|
|
|
pavanip wrote:
function openwindow()
{
window.open("AssignedTickets.aspx",'window','width=630,height=620,background=silver,menubar=no, resizable=no')
}
Adding parameters to the querystring would be a clean way of doing it, though it has its disadvantages.
Do:
function openwindow()
{
window.open("AssignedTickets.aspx?Param1=Something¶m2=somethingother",'window','width=630,height=620,background=silver,menubar=no, resizable=no')
}
Then in the code behind of AssignedTickets you can access these with:
string param1 = Request.QueryString["param1"];
var question = (_2b || !(_2b));
|
|
|
|
|
thanks for your response. I am trying with that code. But my values are in textboxes. can you tll me exact syntax to assign textbox values to param1 ans param2?
|
|
|
|
|
Oh, man...
var param1 = document.getElementById('textBox1').value;
obviously it doesnt have to be called param1.
Please read up on javascript, seems like you need it.
Good luck.
var question = (_2b || !(_2b));
|
|
|
|
|
I used this statement to pass values
var param1 = document.getElementById('textBox1').value;
but it dost not passing anything i am getting null value.
|
|
|
|
|
Oh, come on.
it's not my fault your control does not have any text in it.
Where are you declaring the param1 variable, anyway?
Where are you accessing it from?
Is your control's ID textBox1 ?
Either put some more code out here or google for it and figure it out yourself.
I really do recommend the latter, too.
var question = (_2b || !(_2b));
|
|
|
|
|
i have written a code for login control but it generate the following error
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0161: 'ASP.login_aspx.SiteLevelCustomAuthenticationMethod(string, string)': not all code paths return a value
Source Error:
[No relevant source lines]
Source File: Line: 0
Microsoft (R) Visual C# 2008 Compiler version 3.5.21022.8
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
e:\New Folder (2)\WebApplication1\WebApplication1\login.aspx(15,14): error CS0161: 'ASP.login_aspx.SiteLevelCustomAuthenticationMethod(string, string)': not all code paths return a value
the code is
database name pubs and table name pswd
where columns are User and pswd
]]>
]]>
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
bool Authenticated = false;
Authenticated = SiteLevelCustomAuthenticationMethod(Login1.UserName, Login1.Password);
e.Authenticated = Authenticated;
if (Authenticated == true)
{
//Response.Redirect();
}
}
private bool SiteLevelCustomAuthenticationMethod(string UserName, string Password)
{
SqlCommand cmdSelect;
bool boolReturnValue = false;
string strConnection = "@Server=localhost;Integrated Security=SSPI; Database=Pubs";
SqlConnection Connection = new SqlConnection(strConnection);
cmdSelect = new SqlCommand( "Select * From pswd", Connection );
SqlDataReader Dr;
Connection.Open();
Dr = cmdSelect.ExecuteReader();
while (Dr.Read())
{
if ((UserName == Dr["user"].ToString()) & (Password == Dr["Pswd"].ToString()))
{
boolReturnValue = true;
}
Dr.Close();
return boolReturnValue;
}
}
<asp:login id="Login1" runat="server" onauthenticate="Login1_Authenticate" xmlns:asp="#unknown">
|
|
|
|
|
rosae619 wrote: 'ASP.login_aspx.SiteLevelCustomAuthenticationMethod(string, string)': not all code paths return a value
Doesn't this say that SiteLevelCustomAuthenticationMethod is not returning something when it should ?
rosae619 wrote: while (Dr.Read())
{
if ((UserName == Dr["user"].ToString()) & (Password == Dr["Pswd"].ToString()))
{
boolReturnValue = true;
}
Dr.Close();
return boolReturnValue;
}
You have closed the while loop at wrong place.
|
|
|
|
|
Hi,
I'm new in ASP.NET and need some help with my problem. I need to convert some HTML tags to Microsoft Office Word 2003's XML format. Is there any built-in component from .NET that can do this?
Thanks in advance for your help.
|
|
|
|
|
All,
I am looking for a mechanism which makes use of "Forms authentication" and "Role based authorization".
Requirement is
my application should validate users belonging to different groups "Admin,guest,developer" and each group may consist of no of users.
for ex: if i(developer) logs in with my id and pwd i should be redirected to web pages that are specific to me, likewise for admin and guest too.
i am considering option of storing credentials in sessions and fetch the roles from db for access.
Is this a feasible option.
can anyone guide me?
Thanks
Mukkanti
|
|
|
|
|
Look up bitmasking, it will be of great help for you.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
hi can you be more specific plz..
Thanks
Mukkanti
|
|
|
|
|
Hello there
I'm having this registration form with 7 fields of real_name, user_name, email, password, city, webpage and signiture, I want my users to fill in this form and then after submitting the form I want to send them an activation email. my database has mentioned fields and also id (using identity) and verfy_user with default value of 0 (which means not).
2 questions are here for me:
1- how can I send activation email (simply?)
2- how can I prevent unactivate users from logging in?
your responses will be highly appriciated
Proper Prepration Prevents Poor Performance! h
|
|
|
|
|
netsooz (Amir Hamidi) wrote: 1- how can I send activation email (simply?)
Look up System.Web.Mail or System.Net.Mail.
There's loads of Smtp classes in there. And they're fairly simple.
netsooz (Amir Hamidi) wrote: 2- how can I prevent unactivate users from logging in?
Add a bit field in your users table (e.g. IsActive) and set it to true, when the user you're sending an activation email to clicks on the link in that email.
var question = (_2b || !(_2b));
|
|
|
|
|
1. First user fill the registration form.
2. User Click on the submit button.
3. On submit button click, you send him a activation mail for his account.
Now Following is my suggestion for your question.
netsooz (Amir Hamidi) wrote: 1- how can I send activation email (simply?)
Now, I will suggest, add one more filed called GUID in the DB. While sending the mail add the GUID with the corresponding user in the database and send the activation url.
Send a URL link with the email like
http://yourwebsite.com/Verification.aspx?Guid="AFDFASDFrwerwSDF@423"
Now, This GUID will ensure that, weather the user coming from the proper source or not. When user hits the URL, Read the Query String and verify the user GUID from the database. Now if its valid, then set the verfy_user filed to 1 and redirect user to Home Page.
netsooz (Amir Hamidi) wrote: 2- how can I prevent unactivate users from logging in?
During login, Check verfy_user field along with the User ID and Password. If user ID and password matched but verfy_user is still 0, then throw a message that Please activate your account.
Hope this will helps you to move ahead.
Good luck.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Good answer, but just for the record:
Abhijit Jana wrote: add one more filed called GUID
filed - as in my glass has been filed with wine [sic]
field - as in my database field is "Username"
Don't worry though. Most English people get confused with these english words which sound (and often look) the same but have different meanings.
|
|
|
|