|
Don't post the same question in multiple forums..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Dear Sir, I m working on datagrid in asp.net using vb.net. I m using dropdown list in that datagrid. I have created a function for that from which data comes from a database. It is getting data but not according to the records index. What should I do. Plz if u can send me the code for that.
|
|
|
|
|
Safecom wrote: It is getting data but not according to the records index.
what do you mean ? explain more
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Sir I have get record like following
ID Name Address Position
in above Position is dropdown list. In this there is position of each name like 1,2,3,4. I want to display position acording to the names in that dropdown list in front of each name. But there is 1, 1, 1, 1 in all fields.
|
|
|
|
|
suppose the following:
your record structure is like this
ID Name Address Position
and have valuese
1 n1 ad1 p1
2 n2 ad2 p2
3 n3 ad3 p3
etc....
in the datagrid itemDataBound event set the DropDownList text value
to your records like this
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem
Dim tempDpor As DropDownList= CType(e.Item.Cells(intIndex).Controls(1),DropDownList)
Dim strPostion As String =DataBinder.Eval(e.Item.DataItem, "Position")
tempDpor.text = strPostion
End Select
note that the intIndex is the column index where is your dropdown
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hello everyone,
I'm not sure if this is the correct place to post my question, here is how it goes:
I have an ASP .NET application with VB .NET as code behind. On a page, I have a flash form.
From flash form point of view:
1. Enter an ID and post the ID to an aspx file, say get.aspx, to communicate with database and get the details of the item, therefore return info as url variables to flash form to display (actionscript: using LoadVars functions).
2. After retrieving, I update the info from within the flash form and submit. Same way, post to another aspx file, say update.aspx, to update to the database.
Here is when my problem arises:
On step 1 above, when flash form request the get.aspx to retrieve info, this file actually enters the temporary inet files. Hence, when I enter the ID for the second time, the info retrieved is NOT the updated one. This is confirmed because I have checked database, correct values are updated. I have also tried manually deleting get.aspx and retrieve, this time update info is retrieved.
So for working around the above, I am thinking of deleting get.aspx after I have done updating the database in update.aspx. However, I have tried searching the internet, and couldn't find the way to do that using VB .NET.
Does anyone have any idea how I can solve this issue?
Thanks a bunch!!
|
|
|
|
|
It's alright guys, I just found out, just set get.aspx to non-cacheable, problems solved!
Cheers!
|
|
|
|
|
Hi dears,
I want to use several upload file controls in several pages like avatar uploader and file uploader ...! Now I want to configure web.config to set maximum lenght of uploaded files for these 2 control . how can I do that ?
thx,
|
|
|
|
|
|
Hi all,
Please send the regualar expression to validate the control must contain
A)3-10 character having
a-z,A-Z,0-9,@_'-
B) At least 8 character is required (a-z,A-Z,!,_) where control must contain at least one number and one lower case letter.
thanks in advance.
regards
srinandan
-- modified at 5:03 Thursday 2nd November, 2006
|
|
|
|
|
for case (A) use : [\w@_]{3,7}
|
|
|
|
|
immori wrote: for case (A) use : [\w@_]{3,7}
The underscore character is included in \w, but you forgot the apostrophe and the dash.
[\w@'\-]{3,7}
---
b { font-weight: normal; }
|
|
|
|
|
hi
thnks
if someone know have solution for second case please send asap,
srinandan
|
|
|
|
|
Hi there!! When window.close is called to close the window, a confirmation yes or no dialog box pops up how to get rid of it.
Thanks
Don't Quit
|
|
|
|
|
I don't think so that a confirmation message is coming when using window.close. What exactly is the code you are using?
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
Firstly thanks for replying. I'm using window.close() on the click event of a button.Message being shown is "The web page you are viewing is trying to close the window.Do you want to close this window."
Don't Quit
|
|
|
|
|
What browser are you using? Because IE for windows and NN 4.x browsers do not allow a non-JavaScript-generated window with more than one page in its history to be closed without asking the user for permission via a confirmation box. In other words, scripts cannot close a main window unconditionally. (found on net )
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
In oder to protect my web pages,how I will redirect all user to a log-in page to check whether they are authorize or not? I ma using vb. Thanks in advance.
|
|
|
|
|
You can check the user credentials in the page load event and if not there you can redirect them to the login page. When a user logins then you can store the his credentials in session and then verify them in the pages.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Use this code to redirect all the access to login.aspx page in your site.
Onto Web.config change the authentication mode
<br />
<authentication mode="Forms"><br />
<forms loginUrl="login.aspx" protection="All"><br />
</forms><br />
</authentication><br />
In order to check is the user session is active you must to create a session var on login event,
And checked every time you load a form (Onload event)
if isnt active the session var (Wasnt create) you redirect the user to out the site (Ex: logout.aspx)
Use These lines to make that i told you on the lines behind
Create var
Session["Active"] = "is Active";
check var
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
string active = Session["Active"].ToString();<br />
}<br />
catch(Exception)
{<br />
Response.Redirect("logout.aspx");<br />
} <br />
I hope you can step forward in your project with this solution.
keep Learning and you never will be out of date...
|
|
|
|
|
Hi Britney.. thank you so much for your reply but I need code written in vb. Can you show? I am really sorry because I badly need a tutorial .Thanks so much. I really appreciate it.
|
|
|
|
|
The syntax is slightly different, the the namespaces and methods are the same.
|
|
|
|
|
I guys...
I am working on event notification engine. In that i have to record data of events which is nothing but action performed by user on document or folder like read,move,delete etc....
so i am confused what what else i should record in this event notification engine so that i can track all actions performed by all user.
right now i have fields like
event id, user id, description etc....
Please help me
DJ
|
|
|
|
|
Hello.
I have an asp:hyperling in my page and I'm trying to make it "clicked" from my code behind.
Is this possible?
I also tried it with JS but its look like the hyperlink doesn't have a "click()" method
Any body have an idea?
Thanks in advance,
Roy.
|
|
|
|
|
Yes that is not there. You can use link button for that purpose, it looks like hyperlink but having the click event.
Best Regards,
Apurva Kaushal
|
|
|
|